If HTTP Referrer = Ziltch.. How?
Posted: Tue May 02, 2006 9:51 pm
feyd | Please use
I Tried:
However this doesn't work, it just writes nothing to ref.dat all the time, wondered if anyone could help me fix this?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Heres My Code:Code: Select all
<?
$ref = $_SERVER['HTTP_REFERER'];
$file = "data/ref.dat";
$fp = fopen($file, "w");
fwrite($fp, $ref);
fclose($fp);
?>Code: Select all
<?
$ref = $_SERVER['HTTP_REFERER'];
if ($ref = "") {
$echo "Unknown";
} else {
$file = "data/ref.dat";
$fp = fopen($file, "w");
fwrite($fp, $ref);
fclose($fp);
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]