Skip to content

Instantly share code, notes, and snippets.

@fjallstrom
Last active February 25, 2017 21:36
Embed
What would you like to do?
fetch sxsw artists 2017
<?php
$artist_html = shell_exec('curl "http://schedule.sxsw.com/2017/artists"');
preg_match_all('!<h4><a href="(.*?)">(.*?)</a></h4>!', $artist_html, $matches);
foreach($matches[1] as $i=>$val){
print_r($matches[2][$i]." : ".$val."\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment