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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -