安装说明已经说了,不包含图片等素材,,,现在版权打击力度很大,视频这些更敏感,只有代码
抖音的
[PHP] 纯文本查看 复制代码 <?php
header("Access-Control-Allow-Origin: *");
header("Content-type: text/html; charset=utf-8");
$_u = $_GET['url'];
function _g($_u,$_n=0) {
$_h = curl_init();
curl_setopt($_h, CURLOPT_URL, $_u);
curl_setopt($_h, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($_h, CURLOPT_HEADER, false);
curl_setopt($_h, CURLOPT_HTTPHEADER, array(
'user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A366 INSO/1.0(0x16070321) NetType/WIFI Language/zh_CN'
));
if($_n==1){
curl_setopt($_h, CURLOPT_NOBODY, 1);
curl_setopt($_h, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($_h);
$_r = curl_getinfo($_h, CURLINFO_EFFECTIVE_URL);
}else{
$_r = curl_exec($_h);
}
curl_close($_h);
return $_r;
}
if(strpos($_u,'com') !== false){
$_u = _g(_g($_u,1));
preg_match('/class="video-player" src="(.*?)" preload/is', $_u, $_m);
$_m = str_replace("line=0","line=1",str_replace("playwm","play",$_m[1]));
$_v = _g($_m,1);
if($_v==''){
$_c = 001.1;
$_s = 'error';
}else{
$_c = 0;
$_s = 'success';
}
}else{
$_c = 002;
$_s = 'url不匹配';
}
echo json_encode(array("code" => $_c, "message" => $_s,"videoUrl" => $_v,"time" => time()), JSON_UNESCAPED_SLASHES);
?> |