Jump to content

send extension to different urls


fusion27

Recommended Posts

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

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 />

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 :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.