内容目录
一、详细介绍
一定要按照教程教的来搭建!
App演示图片
二、效果展示
1.部分代码
代码如下(示例):
php
public static function apkinfo(){
return self::connect()
->query("select * from fei_systemset where id = 1")
->fetch(PDO::FETCH_BOTH)["loadapk"];
}
public static function HttpUrl(
$url,
$method = 0,
$postData = [],
$header = [
"User-Agent" =>
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0",
]
) {
$Curl = curl_init();
curl_setopt_array($Curl, [
CURLOPT_URL => $url,
CURLOPT_HTTPHEADER => $header,
CURLOPT_RETURNTRANSFER => 1,
]);
$Curldata = curl_exec($Curl);
curl_close($Curl);
return $Curldata;
}
public static function jx($vodurl = 0, $vodid = 0)
{
if (empty($vodurl) && empty($vodid)) {
return json_encode(["url" => "nullnof"]);
}
$vodinfo = self::connect()
->query("select * from mac_vod where vod_id = $vodid")
->fetch(PDO::FETCH_BOTH);
$vod_playFrom = explode("$$$", $vodinfo["vod_play_from"]);
$vod_player_url = explode("$$$", $vodinfo["vod_play_url"]);
for ($i = 0; $i < count($vod_player_url); $i++) {
if (strpos($vod_player_url[$i], $vodurl) !== false) {
$jx_code = $vod_playFrom[$i];
break;
}
}
if (!empty($jx_code)) {
$jx_set = self::connect()
->query("select * from fei_players where code = '$jx_code'")
->fetch(PDO::FETCH_BOTH);
if (strpos($jx_set["jxapi"], "http") !== false) {
$json = $jx_set["json"];
$url = self::HttpUrl($jx_set["jxapi"] . $vodurl);
$regex = '/\{(?:[^{}]|(?R))*\}/';
preg_match_all($regex, $url, $matches);
$u = json_decode($matches[0][0],true);
$lj = $u[$json];
return json_encode(["url" => $lj,"code" => 200]);
} else {
return json_encode(["url" => "nullb"]);
}
} else {
return json_encode(["url" => "nulla"]);
}
}
2.效果图展示