web scraping - New to PHP, trying to extract information from another website -


<?php $content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');  preg_match('<time datetime="(.*)"', $content, $match); $match = $match[1];  echo "$match"; ?> 

i'm trying use dates , times of matches, page takes forever , comes blank.

as joão rafael pointed out, there missing > between " , ' in <time datetime="(.*)"

reformatted code:

<?php $content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');  preg_match('<time datetime="(.*)">', $content, $match); $match = $match[1];  echo "$match"; ?> 

Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -