how can i prevent spider and people from going into a page more then 25 times

Posted on 2008-11-13
Last Modified: 2012-05-11
i used to use sessions in order to count how many times someone enters a page and if it is 25 i ask him to close the internet explorer and open it agaen , but i did not know that if a spider goes into the page the session wont work , and now i know this and i want the spiders to have this limitions as will
how can i do it

do i need something else other than sessions  what and how i do this

Question by:mgtm3
    LVL 11

    Accepted Solution

    You could use a database and store a mix of IP address and user agent information to track who is visiting the page. Spiders usually have special user agent string, so that should give you a better indication of who comes to the page.
    LVL 107

    Expert Comment

    by:Ray Paseur
    Spiders will activate the session_start() command, unless you have programmed around it.  So the spiders will be subject to the counting limits that you place on human visitors.

    Why do you want to keep spiders from finding more than 25 pages in a request?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to count occurrences of each item in an array.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now