PHP application variable... maybe?

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-03-21T23:46:32Z Indexed on 2010/03/21 23:51 UTC
Read the original article Hit count: 409

Filed under:
|
|

I went to a PHP job interview, I was asked to implement a piece of code to detect visitors are bots to crawl thru the website and steal content.

So I implemented a few lines of code to detect if the site is being refreshed/visited too quickly/often by using a session variable to store last visit timestamp.

I got told that session varaibles can be manupilated by cookies etc, so I am wondering if there is a application variable that I can use to store the timestamp information against visitor IPs eg $_SERVER[REMOTE_ADDR]?

I know that I can write the data to a file but it's not very good for a high traffic website.

Regards

James

© Stack Overflow or respective owner

Related posts about php

Related posts about application