-
ok guys.. im totally stumped.. for some reason HTTP_REFERER isnt working
This is my code
$refer = getenv("HTTP_REFERER");
$browser = getenv("HTTP_USER_AGENT");
$ip = $REMOTE_ADDR;
echo ("$refer , $ip, $browser");
it echoes everything but the referer url.. you can test it at
http://www.getmonked.net/test.php
is there any other way, i can find out the domain that refered my site? basically, i am running custom logs
-
********* Callithumpian
I see you've got it working 
http://www.sitepointforums.com/showt...threadid=20240 , 61.9.192.142, Mozilla/5.0 (Macintosh; N; PPC; en-US; 0.8.1) Gecko/20010326
-
hmmm.... this is odd.. it doesnt seem to be working for me..
this is some additional code to just get the domain name
$refer = getenv("HTTP_REFERER");
$browser = getenv("HTTP_USER_AGENT");
$ip = $REMOTE_ADDR;
$doma = ereg_replace("http://","",$refer);
$domai = ereg_replace("/","",$doma);
$domain = ereg_replace("www.","",$domai);
echo ("$refer , $ip, $browser");
echo "<br>Domain name :: $domain<br>";
Last edited by kunal; Apr 5, 2001 at 03:39.
i dunno...
-
********* Callithumpian
I think that there are some browsers which don't send the HTTP_REFERER header. You would have to check the documentation at www.php.net
-
is there any other way to do this?? i couldnt find any with php
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks