Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed Dec 9, 2015
1 parent ed6bdee commit 4f07d53
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -136,7 +136,7 @@ The response is an array containing the HTTP status code, HTTP headers, and the
}
```

You can check if the webmention was accepted by testing if the response code is 200 or 202.
You can check if the webmention was accepted by testing if the response code is 200, 201 or 202.

```php
<?php
Expand All @@ -160,6 +160,16 @@ $urls = $client->findOutgoingLinks($html);
?>
```

Alternately, you can pass a parsed Microformats object to the `findOutgoingLinks`
function and it will search for URLs in any property as well as in the HTML of
any e-content objects.

```php
$client = new IndieWeb\MentionClient();
$parsed = \Mf2\parse($html, $sourceURL);
$urls = self::findOutgoingLinks($parsed);
```

All links found will be returned an array, with duplicate URLs removed. If no links
are found, it will return an empty array.

Expand Down

0 comments on commit 4f07d53

Please sign in to comment.