Reputation: 1
<?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 to use that to get the dates and times of matches, but the page just takes forever and comes up blank.
Upvotes: 0
Views: 102
Reputation: 74220
As João Rafael pointed out, there was a missing >
between "
and '
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";
?>
Upvotes: 1