Created
November 16, 2015 18:48
-
-
Save JaviPedrera/a55bddc42843f46535bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html = file_get_contents('https://es.search.yahoo.com/search?p=madrid&fr=yfp-t-777'); | |
preg_match('/\<ol class\=\" reg searchCenterMiddle\">(.*?)\<\/ol\>/i', $html, $list); | |
preg_match_all('/\<li(.*?)\<\/li\>/i', $list[1], $results); | |
foreach ($results[0] as $result) { | |
echo strip_tags($result); | |
echo "<br/>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment