Posted by cemlouis on 12/06/05 01:31
Hi,
I want to show some specific pages to people that comes to my site from
specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be
used but how?
For ex if the visitor comes from a site that is like:
www.cominghost.com
cominghost.com
www2.cominghost.com
I want to send this person a specific.php . I used below code but not
worked:
<?php
if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){
// Specific page html goes here
}
else
{
header("Location: index.php");
}
?>
This code not worked for some cases like if the visitor comes from
http://www.cominghost.com/account/targeturl.php or
http://cominghost.com/account/targeturl.php Ok I know the if statement
not working but How???
Regards,
Cem
Navigation:
[Reply to this message]
|