fusion27 Posted February 12, 2009 Share Posted February 12, 2009 Hello, I'm trying to get a little php script but i have no idea what its called or if someone has already tried to make one. heres what i need: I have 7 different websites and i need to paste extensions to all of them like this http://domain1.com/index.php?page=pagename http://domain2.com/index.php?page=pagename http://domain3.com/index.php?page=pagename http://domain4.com/index.php?page=pagename http://domain5.com/index.php?page=pagename http://domain6.com/index.php?page=pagename http://domain7.com/index.php?page=pagename but as you can see that will take up some time just to copy/paste the pagename. is there any way i can make it so if i somehow have another php script that if i type in the pagename once it applys to the rest of the websites and launches the websites all in 1 page? sorry if you guys dont understand me :-\ Link to comment https://forums.phpfreaks.com/topic/144898-send-extension-to-different-urls/ Share on other sites More sharing options...
rhodesa Posted February 12, 2009 Share Posted February 12, 2009 define "launch"...do you want them to load in new windows/tabs or in iframes on the same page? Link to comment https://forums.phpfreaks.com/topic/144898-send-extension-to-different-urls/#findComment-760438 Share on other sites More sharing options...
fusion27 Posted February 12, 2009 Author Share Posted February 12, 2009 define "launch"...do you want them to load in new windows/tabs or in iframes on the same page? iframes, also i need to be able to see the activity on the pages so could you make the iframes big enough for me to see each page Link to comment https://forums.phpfreaks.com/topic/144898-send-extension-to-different-urls/#findComment-760557 Share on other sites More sharing options...
rhodesa Posted February 12, 2009 Share Posted February 12, 2009 no need to use PHP then: <style type="text/css"> iframe { width: 100%; height: 400px; } </style> <script type="text/javascript"> function loadFrames ( ) { var eles = document.getElementsByTagName('IFRAME'); for(n=0;n < eles.length;n++){ eles[n].src = eles[n].title + '?pagename='+document.getElementById('pagename').value; } } </script> Enter Pagename: <input type="text" id="pagename" /><input type="button" value="Load" onclick="loadFrames();" /><hr /> Domain 1:<iframe id="domain1" title="http://domain1.com/index.php"></iframe><hr /> Domain 2:<iframe id="domain2" title="http://domain2.com/index.php"></iframe><hr /> Domain 3:<iframe id="domain3" title="http://domain3.com/index.php"></iframe><hr /> Domain 4:<iframe id="domain4" title="http://domain4.com/index.php"></iframe><hr /> Domain 5:<iframe id="domain5" title="http://domain5.com/index.php"></iframe><hr /> Domain 6:<iframe id="domain6" title="http://domain6.com/index.php"></iframe><hr /> Domain 7:<iframe id="domain7" title="http://domain7.com/index.php"></iframe><hr /> Link to comment https://forums.phpfreaks.com/topic/144898-send-extension-to-different-urls/#findComment-760599 Share on other sites More sharing options...
fusion27 Posted February 12, 2009 Author Share Posted February 12, 2009 no need to use PHP then: <style type="text/css"> iframe { width: 100%; height: 400px; } </style> <script type="text/javascript"> function loadFrames ( ) { var eles = document.getElementsByTagName('IFRAME'); for(n=0;n < eles.length;n++){ eles[n].src = eles[n].title + '?pagename='+document.getElementById('pagename').value; } } </script> Enter Pagename: <input type="text" id="pagename" /><input type="button" value="Load" onclick="loadFrames();" /><hr /> Domain 1:<iframe id="domain1" title="http://domain1.com/index.php"></iframe><hr /> Domain 2:<iframe id="domain2" title="http://domain2.com/index.php"></iframe><hr /> Domain 3:<iframe id="domain3" title="http://domain3.com/index.php"></iframe><hr /> Domain 4:<iframe id="domain4" title="http://domain4.com/index.php"></iframe><hr /> Domain 5:<iframe id="domain5" title="http://domain5.com/index.php"></iframe><hr /> Domain 6:<iframe id="domain6" title="http://domain6.com/index.php"></iframe><hr /> Domain 7:<iframe id="domain7" title="http://domain7.com/index.php"></iframe><hr /> Alright great! ill try this out in a bit. thank you very much Link to comment https://forums.phpfreaks.com/topic/144898-send-extension-to-different-urls/#findComment-760607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.