Can any body give me PHP code to detect web crawlers(BOTS) crawling the webpage
For Example, it should show that GOOGLE bot was last visitor and similarly should show total list.
Can any body give me PHP code to detect web crawlers(BOTS) crawling the webpage
For Example, it should show that GOOGLE bot was last visitor and similarly should show total list.
If you feel my post is usefull then click onto give me Reputation
I don't have code to give you, but you'll want to check the PHP internal variable $_SERVER['HTTP_USER_AGENT'] against a list of user agents used by bots (Google for them). If a match is found, you can then log it.
--- Mr. DOS
Ok, but i want code for it , if anybody can give??
If you feel my post is usefull then click onto give me Reputation
Have you tried Google? Always try Google.
Last edited by misson; 12-22-2009 at 04:02 PM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.