Hi All
Can anyone see what is in-correct in this small script.
<?
// this parse's into the following: $url["scheme"], $url["host"], $url["path"]
$url = parse_url($HTTP_REFERER);
//$url["host"] could be in uppercase so.. new var to lower
$check=strtolower($url["host"]);
// checks proper domain only
// no reffer needed
if ($check!='my_domainname')
{
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.my_domainname/index.htm\">"
exit;
}
?>
If I embed it into a HTML page the result on screen shows
" exit; } ?>
The script "I think" should redirect the browser if the page containing this script does not come from the variable $check which holds the my domainname.
If you can see a problem with this script or suggest a better way I would be interested.
Regards
Dereck
Keep safe and well