SandySynaptik Posted May 1, 2011 Share Posted May 1, 2011 Page view something like on this website (bottom) Link to comment Share on other sites More sharing options...
Fmdpa Posted May 1, 2011 Share Posted May 1, 2011 Whenever the page is viewed, you need to insert the user's IP ($_SERVER['REMOTE_ADDR']) and the name of the page into the database. Then you can find out how many unique visitors you've had with this SQL query: SELECT COUNT(DISTINCT ip) FROM visitors WHERE page = '/pagename.php' On my website, I've gone further and also logged the user's browser ($_SERVER['USER_AGENT']), referrer (the page they came from, $_SERVER['HTTP_REFERER'] (sic)), and location. You can do these things with Google Analytics, but I wanted to figure out how to do it with PHP. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.