954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Php redirect

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

Grubb
Newbie Poster
2 posts since Dec 2005
Reputation Points: 10
Solved Threads: 0
 

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

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

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

Grubb
Newbie Poster
2 posts since Dec 2005
Reputation Points: 10
Solved Threads: 0
 

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

AMADH
Light Poster
27 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 
<?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

Mckcvision
Newbie Poster
7 posts since Apr 2010
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: