GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Any PHP or server gurus around tonight? (https://gfy.com/showthread.php?t=600888)

BigBen 04-21-2006 09:21 PM

Any PHP or server gurus around tonight?
 
Is there a way to use an image to track what URL somebody came from when they view the page with the image on it? I created a php file which outputs an image and stores HTTP_REFERER, but this just shows the URL that the actual image is loaded on. I want to see the URL that they came from.

Any ideas?

Superterrorizer 04-21-2006 09:35 PM

Quote:

Originally Posted by BigBen
Is there a way to use an image to track what URL somebody came from when they view the page with the image on it? I created a php file which outputs an image and stores HTTP_REFERER, but this just shows the URL that the actual image is loaded on. I want to see the URL that they came from.

Any ideas?



Uhmm... I'd look at the http server logs. But that's just me. Why waste cpu cycles tracking shit that the webserver is tracking already?

Killswitch - BANNED FOR LIFE 04-21-2006 09:38 PM

maybe try something like viewimg.php?ref=<?php echo $HTTP_REFERER; ?> for the image location, then have viewimg.php load the image and get the referrer?

no idea if it works, never tried it, just an idea

mrthumbs 04-21-2006 09:44 PM

Quote:

Originally Posted by BondOfBabesDotCom
maybe try something like viewimg.php?ref=<?php echo $HTTP_REFERER; ?> for the image location, then have viewimg.php load the image and get the referrer?

no idea if it works, never tried it, just an idea

yeah.. that should do it. it wipes out everything after the first '&' in the refering url but you probably dont need that info anyway

BigBen 04-21-2006 09:54 PM

Quote:

Originally Posted by BondOfBabesDotCom
maybe try something like viewimg.php?ref=<?php echo $HTTP_REFERER; ?> for the image location, then have viewimg.php load the image and get the referrer?

no idea if it works, never tried it, just an idea

Well, I'm going to put the image src on myspace, so the php won't work. I already have to parse .jpg as php. Maybe some javascript?

J.P. 04-22-2006 01:06 AM

something like this:

Code:

<script type="text/javascript">
docref = '';
if (document.referrer) docref=escape(document.referrer);
document.write('<img src="counter.gif?ref=' + docref + '">');
</script>



All times are GMT -7. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123