Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetterMG committed Mar 18, 2016
1 parent 514f9fb commit 64491bf
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,26 @@ You can find out more about Composer here: https://getcomposer.org/


## Usage
Fetch headers automatically:
Get rules for a specific UserAgent:
```php
$parser = new \vipnytt\XRobotsTagParser('http://example.com/', 'myUserAgent');
$rules = $parser->getRules();
$array = $parser->getRules();
```

Export all rules:
Use existing headers:
```php
$parser = new \vipnytt\XRobotsTagParser('http://example.com/');
$rules = $parser->export();
$parser = new \vipnytt\XRobotsTagParser('http://example.com/', 'myUserAgent', ['headers' => $headers]);
$array = $parser->getRules();
```

Export rules for all UserAgents:
```php
$parser = new \vipnytt\XRobotsTagParser('http://example.com/', 'myUserAgent');
$array = $parser->export();
```



## Directives
- [x] ````all```` - There are no restrictions for indexing or serving.
- [x] ````none```` - Equivalent to ````noindex````, ````nofollow````
Expand Down

0 comments on commit 64491bf

Please sign in to comment.