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
Post a Comment