我的卷发出现问题,在变量 $ ketiga 上返回了空白页。
我尝试使用 var_dump 和 print_r 调试我的代码,但仍然空白。
<?php
function mirror($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$tmpfname = dirname(__FILE__).'/cookie.txt';
curl_setopt($ch, CURLOPT_COOKIEJAR, $tmpfname);
curl_setopt($ch, CURLOPT_COOKIEFILE, $tmpfname);
$result = curl_exec($ch);
return $result;
curl_close ($ch);
}
$pertama = mirror('https://mirrorace.com/m/4eL3s');
$pecah = explode('<a class="uk-button uk-button-secondary uk-text-truncate uk-width-1-1" href="',$pertama);
unset($pecah[0]);
$pecah = explode('" rel="nofollow"><span uk-icon="icon: cloud-download">',$pecah[1]);
$pecah = $pecah[0];
//echo $pecah;
$kedua = mirror($pecah);
$pecahdua = explode('<a class="uk-button uk-button-large uk-button-primary" href="',$kedua);
$pecahdua = explode('" rel="nofollow" target="_blank"><span uk-icon="icon: link">',$pecahdua[1]);
$pecahdua = $pecahdua[0];
//echo $pecahdua;
$ketiga = mirror($pecahdua);
print_r($ketiga);
?>
在这种情况下,我想从mirrorace中获取openload.com链接
谢谢