如何实现IP阻止脚本

i want to know the user how many times enter in my website and also from the same ip address

using php.

i would like to prevent the site from user who continuously hit my site with in 2 seconds or 1 seconds.

if continuously any user hit my site i would like to avoid that user ip address.

thanks in advance

I would create a script which writes this information into a database, and I'd probably also include the PHP Session so you can differentiate between hits and visits.

Have a look at the PHP global reserved variables. http://www.php.net/manual/en/reserved.variables.server.php