Skip to content

Commit 4f07d53

Browse files
committed
update readme
1 parent ed6bdee commit 4f07d53

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The response is an array containing the HTTP status code, HTTP headers, and the
136136
}
137137
```
138138

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

141141
```php
142142
<?php
@@ -160,6 +160,16 @@ $urls = $client->findOutgoingLinks($html);
160160
?>
161161
```
162162

163+
Alternately, you can pass a parsed Microformats object to the `findOutgoingLinks`
164+
function and it will search for URLs in any property as well as in the HTML of
165+
any e-content objects.
166+
167+
```php
168+
$client = new IndieWeb\MentionClient();
169+
$parsed = \Mf2\parse($html, $sourceURL);
170+
$urls = self::findOutgoingLinks($parsed);
171+
```
172+
163173
All links found will be returned an array, with duplicate URLs removed. If no links
164174
are found, it will return an empty array.
165175

0 commit comments

Comments
 (0)