I have pagerank checker site, And i want to limit it so that user can only run the pagerank checker for 10 times/user or IP. any solution or example or tutorial on this. thanks in advance
an easy way, would be to create a session (start_session()) and use that to track on how many times they have used it, once they hit your limit, don't let them use the tool again until the limit frame has run out. another way to do it, would be to have a mysql table, that you just put ipaddress,time and browser strings into, insert a row when a search is done, and before it's used, check to see how many rows there are, if the number of rows is over your allowed amount, don't let them use it.
You can use cookie, session, database, etc. But user can clear cookie, restart browser or change the ip. You may require register too.
Just use a database. Your script that does the pagerank can get the IP using $_SERVER['REMOTE_ADDR']. You don't need sessions or cookies for IP tracking. Per user tracking would require a login and sessions. You do the same thing as an IP but in the database you store the username instead of the ip address. Whenever a request is made update or insert the entry into the database to track the number of time that ip has made the request for the current day. Then get the count and if it's greater than X then just exit the script.
If you just use remote IP, you can't block the users who use dynamic IP. The better way is to request use to register an account.