Could some one tell me how can I redirect one page to multiple urls in new tabs using just php(no java).

Ex:

User access www.mysite.com and he is redirected in 2 new tabs in www.myothersite.com/info.html www.myothersite.com/checkitout.htlm and the initial tab with www.mysite.com refreshes and is www.myothersite.com.

Thanks

Recommended Answers

Just php is not possible, because it has no knowledge of your browser.

Jump to Post

All 4 Replies

Just php is not possible, because it has no knowledge of your browser.

Ok, than a way using javascript, but opening a new tab not a new window, or somehow to bypass the pop up blocker.

why don't you do a redirect in you htaccess?

<?php 
$link=rand(1, 2);
if($link==1){
 $link="daniweb.com";
}
else if($link==2){
  $link="yahoo.com";
}
header( 'refresh: 0.01; url=http://www.$link' );

?>

Maybe something link that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.