niche Posted April 5, 2010 Share Posted April 5, 2010 How do get the URL of someone at my site?Thanks,Niche Link to comment Share on other sites More sharing options...
Err Posted April 5, 2010 Share Posted April 5, 2010 You can use a visitor tracking system. This will give you all the pages they visit, as well as a lot of other useful information such as browser agent, IP address, length of time they stayed, referrers, etc. Link to comment Share on other sites More sharing options...
niche Posted April 5, 2010 Author Share Posted April 5, 2010 I can imagine how to do that for registered users, but I'd like to do that for unregistered users as well. Isn't there some way to get the 'address' of unregistered users? Link to comment Share on other sites More sharing options...
thescientist Posted April 5, 2010 Share Posted April 5, 2010 what rahXephon suggested would work for all "users", i.e. visitors. Maybe check out something like Google Analytics? Or just google "visitor tracking software". Link to comment Share on other sites More sharing options...
niche Posted April 5, 2010 Author Share Posted April 5, 2010 Can you give me a hint or the first few lines of a script that would let me track an unregistered visitor? For me , one of the big points of learning all these scripts is to avoid buying someone's program or script (unless I must). Link to comment Share on other sites More sharing options...
thescientist Posted April 5, 2010 Share Posted April 5, 2010 google "free visitor software tracking"?google analytics is free, and is just code to paste onto all the pages you want to track, and provides you an "admin" panel to monitor everything.As far as doing it yourself, you can access browser history and browser statistics through javascript. I think this is also where you could get their IP address. For time spent on a page, you could use a javascript interval (timer) to count the time spent on a page, and then send that info to a PHP script on window.unLoad to record and save all those times spent on those pages. I think the biggest hurdle involved in analytics tracking is being able to process all this information in a way that makes sense and can be useful. You can save all the info, time, IP's, pages viewed, but to put together into useful information is arguably the hardest part of the job. You have take all that information and put it into a useful perspective, creating graphs for duration, break down browsers into percentages, chart time spent per page, etc. My advice would be to sign up for googly analytics and then go back in a couple of weeks and see what info they provide you. It can be a bit overwhelming just to make sense of all the info they provide you, but it could be a good guide for how you want to accomplish your goal, or you may just think to yourself, "this is just what I need, I'll let them keep doing it!" Link to comment Share on other sites More sharing options...
niche Posted April 5, 2010 Author Share Posted April 5, 2010 Many thanks to RahXephon and thescientist! You've given me enough to get to the next level.Niche Link to comment Share on other sites More sharing options...
justsomeguy Posted April 5, 2010 Share Posted April 5, 2010 If you're trying to get the current user's IP address you can find that in $_SERVER['REMOTE_ADDR']. Users don't have a "URL", files and directories do. If you just want to track a user around your site, you can also use the session to track information as they go around your site. Link to comment Share on other sites More sharing options...
niche Posted April 5, 2010 Author Share Posted April 5, 2010 Thanks to justsomeguy. He gave me the tip to find: http://www.php.net/manual/en/reserved.variables.server.php.Thanks,Niche Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.