An open API service indexing awesome lists of open source software.

https://github.com/euskadi31/robots

A PHP 5.3+ framework for Robots.txt
https://github.com/euskadi31/robots

Last synced: 3 months ago
JSON representation

A PHP 5.3+ framework for Robots.txt

Awesome Lists containing this project

README

        

# Robots.txt [![Build Status](https://travis-ci.org/euskadi31/Robots.png)](https://travis-ci.org/euskadi31/Robots)

## Test with [Atoum](https://github.com/atoum/atoum)

cd Robots/
curl -s https://getcomposer.org/installer | php
php composer.phar install --dev
./vendor/atoum/atoum/bin/atoum --glob Tests/Units/

## Reader

``` php
parse(
file_get_contents(Robots\Reader::url('http://www.robotstxt.org'))
));

?>
```

Output

Array(
[User-agent] => Array(
[0] => Array(
[Name] => *
)
[1] => Array(
[Name] => litefinder
[Disallow] => Array(
[0] => /
)
)
[2] => Array(
[Name] => Slurp
[Disallow] => Array(
[0] => /
)
)
[3] => Array(
[Name] => Baidu
[Disallow] => Array(
[0] => /
)
)
)
)