0
<?php
$content = file_get_contents('http://na.lolesports.com/season3/split2/schedule');

preg_match('<time datetime="(.*)"', $content, $match);
$match = $match[1];

echo "$match";
?>

我正在尝试使用它来获取比赛的日期和时间,但该页面只需要永远并且出现空白。

4

1 回答 1

1

正如若昂·拉斐尔( 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";
?>
于 2013-08-13T01:36:22.727 回答