Hi,
I am looking for Free PHP script to open multiple URLs at once click. Please let me know if anyone find anywhere.
Thanks in advance, Manim
Hi,
I am looking for Free PHP script to open multiple URLs at once click. Please let me know if anyone find anywhere.
Thanks in advance, Manim
You probably want to affect a client's behavior, in which case you don't need PHP. Plain old HTML + Javascript will do:
<a href="#" onclick="window.open('http://www.google.com');
window.open('http://yahoo.com');">Open Google and Yahoo</a>
Chances are this will be caught by popup blockers though.
To generate such code with PHP, just do:
// say your links are in an array:
$links = array('http://www.google.com', 'http://www.yahoo.com');
$open = '';
foreach ($links as $link) {
$open .= "window.open('{$link}'); ";
}
echo "<a href=\"#\" onclick=\"{$open}\">Open multiple links</a>";