首页 源码分享正文

米酷6.2 版 幻灯显示不正常的修改方法。

admin 源码分享 2020-02-19 123 0

针对米酷6.2版 幻灯显示不正常,请修改源文件  网站根目录下 default.php 文件,里面的$rurl=fileget($surl,5);   修改为$rurl=fileget2($surl,5);   就是在fileget后面加个2,估计是fileget有两个函数,估计是fileget函数失效,fileget2函数可用。



这是这二个函数的代码


function  fileget($flid2,$timeout = 5) {

mkdir('./cache');

mkdir('./cache/runtime');

$gxpd=time()-filemtime('./cache/runtime/'.md5($flid2));

if($gxpd>2*60*60){

set_time_limit(0);  

$ch = curl_init(); 

curl_setopt($ch,CURLOPT_REFERER,$flid2);

curl_setopt($ch,CURLOPT_COOKIESESSION,true);  

curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);     

curl_setopt($ch, CURLOPT_URL,$flid2);

$fcon = curl_exec($ch);  

file_put_contents('./cache/runtime/'.md5($flid2),gzdeflate($fcon));

}

$fcon=gzinflate(file_get_contents('./cache/runtime/'.md5($flid2)));

return $fcon;

}

function  fileget2($url,$timeout = 5) {

$user_agent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36";

$curl = curl_init(); 

curl_setopt($curl, CURLOPT_URL, $url);

curl_setopt($curl, CURLOPT_USERAGENT,$user_agent);

curl_setopt($curl, CURLOPT_REFERER,$url) ;

curl_setopt($curl, CURLOPT_AUTOREFERER, 1);

curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);

curl_setopt($curl, CURLOPT_HEADER, 0); 

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_FOLLOWLOCATION,1);

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, '0');

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, '0');

curl_setopt($curl, CURLOPT_ENCODING, '');

return curl_exec($curl);

curl_close($curl);

}


版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

评论