/    Sign up×
Community /Pin to ProfileBookmark

How to tell if visitor is a robot

I am trying to build visitor logs for my site similar to something like awstats, but not nearly as indepth, one thing I would like to know is how I can recognize if a visitor is a search engine robot or a web crawler as a opposed to a real live person.

I will capture this data in txt log files so that I can gauge the REAL activity of my site.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@JunkMaleJun 20.2009 — You could see if the users browser setting is set. Looking at the logs to the sites I maintain, the logs show the user agents web browser and bots like Yahoo and Google.

As for capturing this activity, it may be better to push the data in to a database as I have found locking issues with the flatfile method were a problem.
Copy linkTweet thisAlerts:
@webmaster54880authorJun 20.2009 — Was there a security issue by writing this data to flatfiles as opposed to storing it in a database or were the flat files just too big to maintain?
Copy linkTweet thisAlerts:
@JunkMaleJun 20.2009 — Access issue, if another instance of the update process is using the file then your current and other instances have no access until the file becomes avaiable again.

A database is quick, has none of the problems that you have with flat files and they can store huge amounts of log data that would eat up web space in large files.
×

Success!

Help @webmaster54880 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...