To do this, you need to use regular expressions:
$txt = file_get_contents('http://www.codingrecipes.com/'); preg_match_all('#<a\s+href=(?:"|\')(.+?)(?:"|\')#i', $txt, $matches); foreach ($matches[1] as $url) echo "$url\n<br />";
To do this, you need to use regular expressions:
$txt = file_get_contents('http://www.codingrecipes.com/'); preg_match_all('#<a\s+href=(?:"|\')(.+?)(?:"|\')#i', $txt, $matches); foreach ($matches[1] as $url) echo "$url\n<br />";
No comments yet.
RSS feed for comments on this post. TrackBack URL