Login   Register  
PHP Classes

Robots_txt: Test if a URL may be crawled looking at robots.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Andy Pieters
Name: Andy Pieters <e-mail contact>
Packages: 1 Browse all classes by Andy Pieters Browse all classes by
Country: United Kingdom United Kingdom - PHP jobs in United Kingdom
Age: 36
All time rank: 181778 in United Kingdom United Kingdom
Week rank: 2007 Down84 in United Kingdom United Kingdom Down
Innovation award
Innovation award
Nominee: 1x

  Detailed description   Download Download .zip .tar.gz  
This class can be used to check whether a page may be crawled by looking at the robots.txt file of its site.

It takes the URL of a page and retrieves the robots.txt file of the same site.

The class parses the robots.txt file and looks up for the rules defined in that file to see if the site allows crawling the intended page.

The class also stores the time when a page is crawled to check whether next time another page of the same site is being crawled it is honoring the intended crawl delay and request rate limits.

  Classes of Andy Pieters  >  Robots_txt  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Robots_txt
Base name: robots_txt
Description: Test if a URL may be crawled looking at robots.txt
Version: 1.1
PHP version: 5.0
License: GNU General Public License (GPL)
All time users: 1271 users
All time rank: 2740
Week users: 0 users
Week rank: 1775 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Searching Search engines, crawling and indexing View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
January 2008
Number 8
robots.txt is a file that sites need to have in their domain Web root to tell search engine crawlers and Web robots in general which pages should not be crawled.

This class can parse a robots.txt file of a domain to determine whether a given page should be crawled or not.

It is useful to implement a friendly crawler which respects the wishes of site owners that do not want to have certain pages crawled by Web robot programs.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Not sure (50.0%) Sufficient (62.5%) Not sure (50.0%) - - - Insufficient (36.2%) 2209
Month: Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file Robots.txt.class.php Class Core file
Accessible without login Plain text file README.txt Doc. Usage Examples

Download Download all files: robots_txt.tar.gz robots_txt.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.