说有错误
我试图让它在playlist.m3u8?wmsAuthSign=和"之间抓取我在mylink.com/file.php?f=whatever之后放置的任何页面,然后将放置在www.linkhere.com/之后的任何页面在 GETURL 代码中,因此它在linkhere.com/whatever页面上的playlist.m3u8?wmsAuthSign=和"之间抓取(如果这有意义的话
这是代码:
<?php
function getURL($u){
$u = file_get_contents("http://{$u}");
return $u != false ? $u : "";
}
function GetStringBetween($string, $start, $finish){
$string = " ".$string;
$position = strpos($string, $start);
if ($position == 0) return "";
$position += strlen($start);
$length = strpos($string, $finish, $position) - $position;
return substr($string, $position, $length);
}
$stream = GetStringBetween(getURL("www.linkhere.com/<?=!isset($_GET["f"]) ? "filehere.php" : htmlspecialchars($_GET["f"])?>"),"playlist.m3u8?wmsAuthSign=", '"');
?>