<?php
$content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');
preg_match('<time datetime="(.*)"', $content, $match);
$match = $match[1];
echo "$match";
?>
我正在尝试使用它来获取比赛的日期和时间,但该页面只需要永远并且出现空白。
<?php
$content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');
preg_match('<time datetime="(.*)"', $content, $match);
$match = $match[1];
echo "$match";
?>
我正在尝试使用它来获取比赛的日期和时间,但该页面只需要永远并且出现空白。
正如若昂·拉斐尔( João Rafael)指出的那样,>
在"
'
<time datetime="(.*)"
重新格式化的代码:
<?php
$content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');
preg_match('<time datetime="(.*)">', $content, $match);
$match = $match[1];
echo "$match";
?>