Skip to content

kudmni/Robots.txt-Parser-Class

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Robots.txt php parser class

Php class to parse robots.txt rules according to Google & Yandex specifications.

Example:

<?php
	// lib import
	require_once('robotstxtparsermachine.php');
	$parser = new robotstxtparsermachine(file_get_contents('http://google.com/robots.txt'), 'UTF-8');
	var_dump($parser->isDisallowed('/someurl'));
	var_dump($parser->isAllowed('/someotherurl.html'));
	print_r($parser->rules);
?>

About

Php class for robots.txt parse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%