Im building a website stats manager, how do you find out where the user came from? Thanx for you help!!!
Jason Rottman
Well, if it is in PHP, I don't know about it exactly, but in Java you could do that. Once I knew that PHP could be "tapped" with Java, but I'm not sure about that.
the HTTP_REFERER holds the site previous to the one being viewed, so something along the lines of $referer = getenv('HTTP_REFERER'); should give you the ip you're looking for... Note, that if you're trying to build the traffic monitor to be hosted on another, distant server and be called by an <img> tag to a php script your referer won't work.
if you want to look at a traffic tracker in perl (don't know if you speak it or not) I wrote one a while back. source code at http://homepage.mac.com/ghorwood and the service running and free at http://trafficspotter.netfirms.com