• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

php referral

hessan

New Member
hi
are there any php referral scripts that redirect to different places depending on from what site they came from ?
 
i think it is not very tough to write one
PHP:
$ref_id=$HTTP_REFERER;

if(strstr($ref_id,"site1.com"))
{                                                     // if it came from site 1 redirect to page1
    header("Location: page1.php");
}
else if(strstr($ref_id,"site2.com"))  // else if to page 2
{
    header("Location: page2.php");
}                                                      //and so on
 
Back
Top