小东博客

在博客中加入百度短网址连接

<? $url="https://b.lxd.cc/?post=".$logid; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,"http://dwz.cn/create.php"); curl_setopt($ch,CURLOPT_POST,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); $data=array('url'=>$url); curl_setopt($ch,CURLOPT_POSTFIELDS,$data); $strRes=curl_exec($ch); curl_close($ch); $arrResponse=json_decode($strRes,true); if($arrResponse['status']==0) { /**错误处理*/ echo iconv('UTF-8','GBK',$arrResponse['err_msg'])."\n"; } /** tinyurl */ echo...

自动跳转手机版||电脑访问手机版自动跳转电脑版

手机访问电脑版自动跳转手机版代码 <script type="text/javascript"> //手机跳转 var browser = { versions: function() { var u = navigator.userAgent; var app = navigator.appVersion; return { trident: u.indexOf('Trident') > -1, presto: u.indexOf('Presto') > -1, pwebkit: u.indexOf('AppleWebKit') > -1, gecko: u.indexOf('Gecko') > -1 && u.indexOf('Khtml') == -1, mobile: !!u.match...