I want to know how many user enter to my webpage directly and how many by search engines or other sites.
How i can do that?
I want to know how many user enter to my webpage directly and how many by search engines or other sites.
How i can do that?
Your obvious choice would be Google Analytics, although not a "PHP" solution, it should give you all of the information you need.
It's widely supported across the internet and is pretty easy to use too!
Here's the "traffic sources" page:
You can use Google analytics http://www.google.co.in/analytics/ You can monitor everything on your web page using google analytics
Do this:
$referer = $_SERVER['HTTP_REFERER']'
You can then store this in a database.
It will be blank if the end user:
Google analytics:
How Does Google Analytics Collect Data?
The data that Google Analytics uses to provide all the information in your reports comes from these sources:
The HTTP request of the visitor Browser/system information First-party cookies : You can get these all from the $_SERVER global.