Jump to content


Photo

$referrer


  • Please log in to reply
1 reply to this topic

#1 aeafisme23

aeafisme23
  • Members
  • PipPipPip
  • Advanced Member
  • 121 posts
  • LocationUSA

Posted 08 May 2006 - 08:58 PM

Description:

Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com).

Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar.

Here is what i got so far:

/* Error Checking, if state or city does not exist, then go back to Original URL ... so if you came from Yahoo, go back to Yahoo */
if ($state == "" || $city =="") {
$URL=$referrer;
header ("Location: $URL");
}

/* Error Checking, if here then just do that simple echo more programming would be inserted with includes and what not 
/* RICHMOND, VIRGINIA: WTVR AND MATTRESS WAREHOUSE*/
elseif ($state == "VA" && $city =="Richmond-Petersburg"){

echo "hi ur from Virginia, Richmond area";}

/* Error Checking, this is an else just because who knows what might happen , but hey lets send them back to Yahoo if thats where they came from 
else {
$URL=$referrer;
header ("Location: $URL");
}
?>

Everything works except for the fact that it redirects back to the [a href=\"http://www.domain.org/\" target=\"_blank\"]http://www.domain.org/[/a]video/INDEX.PHP not back to say AMAZON or ebay wherever a person is entering the link from. Any ideas? Thanks guys

#2 aeafisme23

aeafisme23
  • Members
  • PipPipPip
  • Advanced Member
  • 121 posts
  • LocationUSA

Posted 09 May 2006 - 02:13 PM

Simplified Version:

Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com).

Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users