August 28th, 2003, 10:46
Ok PHP Guru's i got a question for you...

anybody know of a way and this is an example that if somebody were to click a link off google to a website that the php script would determine that the visitor came from google and display a image saying "Welcome google user"

this method is known as a googletap

however i cant think of how this would be done.. but i know it is possible

August 28th, 2003, 18:15
Look at the refer, if the base URL is then you can display the image

[code:1:9c329e9d09]if(blah blah blah)
?> <img src="><?

Yes refer can be spoofed but if they can spoof it they don't need a hello google user image :D

EDIT This should work:

if(eregi("", $_SERVER['HTTP_REFERER'])
echo "<img src='google.jpg'>"

If they spoof it will work but I'll post a fix when I get my PHP juices flowing...

August 28th, 2003, 18:57
nice thanks.....

August 28th, 2003, 19:24
$baseURL= explode('/', $_SERVER['HTTP_REFERER'])
if(eregi("", $baseURL[0])
echo "<img src='google.jpg'>"

Does that work? I'm rusty on PHP... I'll also try to find a more effecient way of doin this...