• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

php使用curl和正则表达式抓取网页数据示例

php 搞代码 4年前 (2022-01-01) 77次浏览 已收录 0个评论

这篇文章主要介绍了php使用curl和正则表达式抓取网页数据示例,这里是抓取某网站的小说,需要的朋友可以修改一下抓取其它数据

利用curl和正则表达式做的一个针对磨铁中文网非vip章节的小说抓取器,支持输入小说ID下载小说。
依赖项:curl
可以简单的看下,里面用到了curl ,正则表达式,ajax等技术,适合新手看看。在本地测试,必须保证联网并且确保php开启curl的mode

SpiderTools.class.php

代码如下:
<?php
  session_start();
 //封装成类 开启这些自动抓取文章
  #header(“Refresh:30;http://www.test.com:8080&#8221;);
 class SpiderTools{ 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////
 /*传入文章ID 解析出文章标题*/
 //////////////////////////////////////////////////////////////////////////////////////////////////////////
 public function getBookNameById($aid){
  //初始化curl
  $ch= curl_init();
  //url
  $url=’http://www.motie.com/book/&#8217;.$aid;
  if(is_numeric($aid)){
  //正则表达式匹配
  $ru=”/

\s*(.*)\s*\s*/”;
  }
  else{
  //丧尸爆发之全家求生路_第一章  丧尸爆发  为吾友爱乐儿更新~_磨铁
  $ru=”/(.*)/”;<br />   }<br />   //设置选项,包括URL<br />   curl_setopt($ch, CURLOPT_URL, $url);<br />   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//不自动输出内容<br />   curl_setopt($ch, CURLOPT_HEADER, 0);//不返回头部信息<br />   curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 0); <br />   //执行curl<br />   $output = curl_exec($ch);<br />   //错误提示<br />   if(curl_exec($ch) === false){<br />    die(curl_error($ch));<br />   }<br />   // 检查是否有错误发生<br />   if(curl_errno($ch)){<br />   echo ‘Curl error: ‘ . curl_error($ch);<br />   }<br />   //释放curl句柄<br />   curl_close($ch);<br />   $arr=array();<br />   preg_match_all($ru,$output,$arr);<br />   return $arr[1][0];<br />    }<br />  //////////////////////////////////////////////////////////////////////////////////////////////////////////     <br />  /*传入文章ID  解析文章内容*/<br />  //////////////////////////////////////////////////////////////////////////////////////////////////////////<br />  public  function getBookContextById($aid){<br />   //开始解析文章<br />   $ids=array();<br />   $ids=explode(“_”,$aid);<br />   $titleId=trim($ids[0]);<br />   $aticleId=trim($ids[1]);<br />   $ch= curl_init();<br />   $ru=”/</p><div><div class="_t33rkthes8f"></div><script type="text/javascript">(window.slotbydup = window.slotbydup || []).push({id: "u6795179",container: "_t33rkthes8f",async: true});</script></div><div class="page-content">[\s\S]*</p><pre class="note" id="html_content_\d*">[\s\S]*(.*)/ui"; <br />   $url='http://www.motie.com/book/'.$aid;<br />   //正则表达式匹配</p><p>  //设置选项,包括URL<br />   curl_setopt($ch, CURLOPT_URL, $url);<br />   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//不自动输出内容<br />   curl_setopt($ch, CURLOPT_HEADER, 0);//不返回头部信息<br />   curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 0); <br />   //执行curl<br />   $output = curl_exec($ch);<br />   //错误提示<br />   if(curl_exec($ch) === false){<br />    die(curl_error($ch));<br />   }<br />   // 检查是否有错误发生<br />   if(curl_errno($ch)){<br />    echo 'Curl error: ' . curl_error($ch);<br />   }<br />   $arr=array();<br />   $arr2=array();<br />   preg_match_all($ru,$output,$arr);<br />   curl_close($ch);<br />   #var_dump($arr);<br />   $s=$arr[0][0];<br />   $s=substr($s,180);<br />   $arr2=explode("   return trim($arr2[0]);<br />  }</p><p> ////////////////////////////////////////////////////////////////////////////////////////////////////////// <br />  /*静态方法 @生成小说文件 可以直接调用 */<br />  //////////////////////////////////////////////////////////////////////////////////////////////////////////<br />      public static function createBookById($id){<br />   <br />   if(!is_numeric($id)){</p><p>  echo "<br />INIT BEGIN START WRITE!";<br />   $st=new self();<br />   $cons=$st->getBookContextById($id);<br />   $title=$st->getBookNameById($id);<br />   $cons=trim($cons);<br />   $t=explode(" ",$title);<br />   //构造目录<br />   $dir=array();<br />   $dir=explode("_",$t[0]);<br />   $wzdir=$dir[0];  //书名称 作为目录名称<br />   $wzchapter=$dir[1]; //第几章<br />   //创建目录<br />   $wzdir2=iconv("UTF-8", "GBK", $wzdir);//目录编码 注意这里保留对$wzdir字符串的引用,用来构造文件名,不能用此处,防止二次编码<br />   if(!file_exists($wzdir2)){<br />    mkdir($wzdir2); //创建目录<br />   }<br />   //构造文件名<br />   $wztitle="./".$wzdir."/"."$t[0]".".txt";<br />   //保证保存的文件名称不是乱码<br />   $wztitle=iconv("UTF-8", "GBK", $wztitle);<br />   $f=fopen($wztitle,"w+");<br />   fwrite($f,$cons);<br />   echo "<font color='green'>$wzdir </font>".$wzchapter."<font color='red'>写入成功</font>";<br />   fclose($f); <br />   <br />   } <br />   else{<br />   $ids=self::getBookIdsById($id); <br />  <br />   //这里服务器可能会掉线,所以最好用session记录循环<br />   #for($i=$_SESSION["$id"."_fid"];$i<=count($ids);$_SESSION["$id"."_fid"]++,$i++){<br />  <br />    #self::createBookById($id."_".$ids[$_SESSION["$id"."_fid"]++]);//构造id<br />   #}<br />   <br />   for($i=$_SESSION["$id"."_fid"];$i<=count($ids);$_SESSION["$id"."_fid"]++,$i++){<br />  <br />    self::createBookById($id."_".$ids[$i]);//构造id<br />   }<br />   <br />   #echo "</p><hr /><hr /></p><h1>写入工作全部完成</h1><p>";<br />   #echo $id."_".$ids[0]."<br />"; <br />   #var_dump($ids);<br />   <br />   }</p><p>  }<br />   /*<br />   获取小说的所有ID<br />   @param $id 文章ID<br />   @return array;<br />   */<br />   public static function getBookIdsById($aid){ <br />   $ch= curl_init();<br />   $url='http://www.motie.com/book/'.$aid."/chapter";<br />   //注意这里的?可以获取最少匹配项<br />   $ru='/[\s\S]*?</p><li class="">[\s\S]*?.*?.*?/u';//正则表达式匹配<br />   //设置选项,包括URL<br />   curl_setopt($ch, CURLOPT_URL, $url);<br />   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//不自动输出内容<br />   curl_setopt($ch, CURLOPT_HEADER, 0);//不返回头部信息<br />   curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 0); <br />   //执行curl<br />   $output = curl_exec($ch);<br />   // 检查是否有错误发生<br />   if(curl_errno($ch)){<br />   echo 'Curl error: ' . curl_error($ch);<br />   }<br />   //释放curl句柄<br />   curl_close($ch);<br />   $arr=array();<br />   preg_match_all($ru,$output,$arr<strong style="color:transparent">来源gaodai#ma#com搞@代~码网</strong>,PREG_PATTERN_ORDER);<br />   return $arr[1];<br />   }<br /> }<br /> ?></p></div><p>以上就是php使用curl和正则表达式抓取网页数据示例的详细内容,更多请关注<a href="https://www.gaodaima.com/go.html?url=http://www.gaodaima.com" rel="nofollow" >gaodaima搞代码网</a>其它相关文章!</p><hr /><div class="open-message">搞代码网(<a href="www.gaodaima.com" target="_blank" title="gaodaima.com">gaodaima.com</a>)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱<a>chengxuyuan@gaodaima.com‍</a>,我们会在看到邮件的第一时间内为您处理,或直接联系<a>QQ:872152909</a>。本网站采用<a href="https://www.gaodaima.com/go.html?url=http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" target="_blank" title="BY-NC-SA授权协议">BY-NC-SA</a>协议进行授权 <br >转载请注明原文链接:<a href="https://www.gaodaima.com/75992.html" target="_blank" title="php使用curl和正则表达式抓取网页数据示例">php使用curl和正则表达式抓取网页数据示例</a><a id="spreadAds" target="_blank" href="" onclick="spreadAds()"></a><a id="spreadAds2" target="_blank" href=""></a> </div></p> <div class="article-social"> <a href="javascript:;" data-action="ding" data-id="75992" id="Addlike" class="action"><i class="fa fa-heart-o"></i>喜欢 (<span class="count">0</span>)</a><span class="or"><style>.article-social .weixin:hover{background:#fff;}</style><a class="weixin" style="border-bottom:0px;font-size:15pt;cursor:pointer;">赏<div class="weixin-popover"><div class="popover bottom in"><div class="arrow"></div><div class="popover-title"><center>[搞代码]</center></div><div class="popover-content"><img width="200px" height="200px" src="http://www.gaodaima.com/wp-content/uploads/hai_AliPay.png" ></div></div></div></a></span><span class="action action-share bdsharebuttonbox"><i class="fa fa-share-alt"></i>分享 (<span class="bds_count" data-cmd="count" title="累计分享0次">0</span>)<div class="action-popover"><div class="popover top in"><div class="arrow"></div><div class="popover-content"><a href="#" class="sinaweibo fa fa-weibo" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_qzone fa fa-star" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="qq fa fa-qq" data-cmd="sqq" title="分享到QQ好友"></a><a href="#" class="bds_renren fa fa-renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin fa fa-weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_more fa fa-ellipsis-h" data-cmd="more"></a></div></div></div></span></div> </article> <footer class="article-footer"> </footer> <nav class="article-nav"><div class="_d13vl98i0pw"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6795176", container: "_d13vl98i0pw", async: true });</script> </nav><div id="donatecoffee" style="overflow:auto;display:none;"><img width="400" height="400" alt="支持作者一杯咖啡" src="http://www.gaodaima.com/wp-content/uploads/hai_AliPay.png"></div> <div class="related_top"> <div class="related_posts"><ul class="related_img"> <li class="related_box" > <a href="https://www.gaodaima.com/432021.html" title="利用微信公众号提供的官方API上传图片获取永久图片素材当图床用" target="_blank"><img class="thumb" style="width:185px;height:110px" data-original="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/2.jpg&h=110&w=185&q=90&zc=1&ct=1" alt="利用微信公众号提供的官方API上传图片获取永久图片素材当图床用" /><br><span class="r_title">利用微信公众号提供的官方API上传图片获取永久图片素材当图床用</span></a> </li> <li class="related_box" > <a href="https://www.gaodaima.com/432022.html" title="不用编码的高端网站建设神器" target="_blank"><img class="thumb" style="width:185px;height:110px" data-original="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/1.jpg&h=110&w=185&q=90&zc=1&ct=1" alt="不用编码的高端网站建设神器" /><br><span class="r_title">不用编码的高端网站建设神器</span></a> </li> <li class="related_box" > <a href="https://www.gaodaima.com/432020.html" title="php设计模式一单例工厂" target="_blank"><img class="thumb" style="width:185px;height:110px" data-original="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/2.jpg&h=110&w=185&q=90&zc=1&ct=1" alt="php设计模式一单例工厂" /><br><span class="r_title">php设计模式一单例工厂</span></a> </li> <li class="related_box" > <a href="https://www.gaodaima.com/432019.html" title="精品SSM框架个人健康服务预约系统设计和实现源码查重报告代码讲解论文中期检查ppt已降重" target="_blank"><img class="thumb" style="width:185px;height:110px" data-original="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/4.jpg&h=110&w=185&q=90&zc=1&ct=1" alt="精品SSM框架个人健康服务预约系统设计和实现源码查重报告代码讲解论文中期检查ppt已降重" /><br><span class="r_title">精品SSM框架个人健康服务预约系统设计和实现源码查重报告代码讲解论文中期检查ppt已降重</span></a> </li> </ul><div class="relates"><div class="_mw9fz31sqco"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6795180", container: "_mw9fz31sqco", async: true });</script><ul><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432021.html">利用微信公众号提供的官方API上传图片获取永久图片素材当图床用</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432022.html">不用编码的高端网站建设神器</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432020.html">php设计模式一单例工厂</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432019.html">精品SSM框架个人健康服务预约系统设计和实现源码查重报告代码讲解论文中期检查ppt已降重</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432017.html">Go-内联优化能让程序快多少</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432018.html">推荐一个PHP-Tree无限级分类组件-BlueMTree</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432015.html">php设计模式二注册树</a></li><li><i class="fa fa-minus"></i><a target="_blank" href="https://www.gaodaima.com/432016.html">Gmail如何跟踪邮件阅读状态</a></li></ul></div></div> </div> <div id="comment-ad" class="banner banner-related"><div class="_9madbukio7r"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6677406", container: "_9madbukio7r", async: true });</script><!-- 多条广告如下脚本只需引入一次 --><script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/cm.js" async="async" defer="defer" ></script></div> <div id="respond" class="no_webshot"> <form action="https://www.gaodaima.com/asdloie8574asdqwexzxdqwertasdqwe.php" method="post" id="commentform"> <div class="comt-title"> <div class="comt-avatar pull-left"> <img src="https://cdn.v2ex.com/gravatar/?s=50" class="avatar avatar-108"> </div> <div class="comt-author pull-left"> 发表我的评论 </div> <a id="cancel-comment-reply-link" class="pull-right" href="javascript:;">取消评论</a> </div> <div class="comt"> <div class="comt-box"> <textarea placeholder="说点什么吧…" class="input-block-level comt-area" name="comment" id="comment" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('submit').click();return false};"></textarea> <div class="comt-ctrl"> <button class="btn btn-primary pull-right" type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-check-square-o"></i> 提交评论</button> <div class="comt-tips pull-right"><input type='hidden' name='comment_post_ID' value='75992' id='comment_post_ID' /><input type='hidden' name='comment_parent' id='comment_parent' value='0' /><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="25d9d31f5b" /></p><label for="comment_mail_notify" class="checkbox inline" style="padding-top:0;"><input name="comment_mail_notify" id="comment_mail_notify" value="comment_mail_notify" checked="checked" type="checkbox">评论通知</label><p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="29"/></p></div> <span data-type="comment-insert-smilie" class="muted comt-smilie"><i class="fa fa-smile-o"></i> 表情</span> <span class="muted ml5 comt-img"><i class="fa fa-picture-o"></i><a href="javascript:SIMPALED.Editor.img()" style="color:#999999"> 贴图</a></span> <span class="muted ml5 comt-strong"><i class="fa fa-bold"></i><a href="javascript:SIMPALED.Editor.strong()" style="color:#999999"> 加粗</a></span> <span class="muted ml5 comt-del"><i class="fa fa-strikethrough"></i><a href="javascript:SIMPALED.Editor.del()" style="color:#999999"> 删除线</a></span> <span class="muted ml5 comt-center"><i class="fa fa-align-center"></i><a href="javascript:SIMPALED.Editor.center()" style="color:#999999"> 居中</a></span> <span class="muted ml5 comt-italic"><i class="fa fa-italic"></i><a href="javascript:SIMPALED.Editor.italic()" style="color:#999999"> 斜体</a></span> <span class="muted ml5 comt-sign"><i class="fa fa-pencil-square-o"></i><a href="javascript:SIMPALED.Editor.daka()" style="color:#999999"> 签到</a></span> </div> </div> <div class="comt-comterinfo" id="comment-author-info" > <h4>Hi,您需要填写昵称和邮箱!</h4> <ul> <li class="form-inline"><label class="hide" for="author">昵称</label><input class="ipt" type="text" name="author" id="author" value="" tabindex="2" placeholder="昵称"><span class="help-inline">昵称 (必填)</span></li> <li class="form-inline"><label class="hide" for="email">邮箱</label><input class="ipt" type="text" name="email" id="email" value="" tabindex="3" placeholder="邮箱"><span class="help-inline">邮箱 (必填)</span></li> <li class="form-inline"><label class="hide" for="url">网址</label><input class="ipt" type="text" name="url" id="url" value="" tabindex="4" placeholder="网址"><span class="help-inline">网址</span></li> </ul> </div> </div> </form> </div> <div class="banner banner-comment"><div class="_z8s30eeiks"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6677645", container: "_z8s30eeiks", async: true });</script></div> </div></div><aside class="sidebar"><div class="widget git_banner"><div class="git_banner_inner"><div class="_ij8d6cgwm0r"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6795162", container: "_ij8d6cgwm0r", async: true });</script></div></div><div class="widget git_banner"><div class="git_banner_inner"><script type="text/javascript"> /*360*300-pc-侧边栏多彩标签云*/ var cpro_id = "u6795164";</script><script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/c.js"></script></div></div><div class="widget git_postlist"><div class="title"><h2>热门文章</h2></div><ul> <li> <a target="_blank" href="https://www.gaodaima.com/312199.html" title="php header 详解" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/1.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="php header 详解" /></span><span class="text">php header 详解</span><span class="muted">2022-01-24</span><span class="muted">0</span></a> </li> <li> <a target="_blank" href="https://www.gaodaima.com/266786.html" title="SQLite3系统学习【2】SQL语句" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/5.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="SQLite3系统学习【2】SQL语句" /></span><span class="text">SQLite3系统学习【2】SQL语句</span><span class="muted">2022-01-10</span><span class="muted">0</span></a> </li> <li> <a target="_blank" href="https://www.gaodaima.com/427992.html" title="python的input函数出错怎么办" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/11.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="python的input函数出错怎么办" /></span><span class="text">python的input函数出错怎么办</span><span class="muted">2022-05-22</span><span class="muted">0</span></a> </li> <li> <a target="_blank" href="https://www.gaodaima.com/69557.html" title="怎么用vue.js实现双向绑定?" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/7.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="怎么用vue.js实现双向绑定?" /></span><span class="text">怎么用vue.js实现双向绑定?</span><span class="muted">2021-12-27</span><span class="muted">0</span></a> </li> <li> <a target="_blank" href="https://www.gaodaima.com/368298.html" title="怎么在微博个人主页添加一个新的Tab ?" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/9.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="怎么在微博个人主页添加一个新的Tab ?" /></span><span class="text">怎么在微博个人主页添加一个新的Tab ?</span><span class="muted">2022-01-26</span><span class="muted">0</span></a> </li> <li> <a target="_blank" href="https://www.gaodaima.com/416368.html" title="python函数教程global-和-nonlocal的详细用法" ><span class="thumbnail"><img width="100px" height="64px" src="https://www.gaodaima.com/wp-content/themes/Git-alpha/timthumb.php?src=https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/img/pic/3.jpg&h=64&w=100&q=90&zc=1&ct=1" alt="python函数教程global-和-nonlocal的详细用法" /></span><span class="text">python函数教程global-和-nonlocal的详细用法</span><span class="muted">2022-05-09</span><span class="muted">0</span></a> </li> </ul></div><div class="widget git_banner"><div class="git_banner_inner"><div class="_6zq48yj6kr"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6700845", container: "_6zq48yj6kr", async: true });</script></div></div><div class="widget git_banner"><div class="git_banner_inner"><div class="_zx9adhkf46s"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6795161", container: "_zx9adhkf46s", async: true });</script></div></div><div class="widget git_banner"><div class="git_banner_inner"><div class="_4st5c4knrf5"></div><script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u6795163", container: "_4st5c4knrf5", async: true });</script></div></div></aside> <script type="text/javascript" src="https://www.gaodaima.com/wp-content/plugins/g-prettify/prettify.js"></script></section><div id="footbar" style="border-top: 2px solid #8E44AD;"><ul><li><p class="first">版权声明</p><span>本站的文章和资源来自互联网或者站长<br>的原创,按照 CC BY -NC -SA 3.0 CN<br>协议发布和共享,转载或引用本站文章<br>应遵循相同协议。如果有侵犯版权的资<br>源请尽快联系站长,我们会在24h内删<br>除有争议的资源。</span></li><li><p class="second">网站驱动</p><span><ul><li><a href="http://www.gaodaima.com/go/aliyun" title="部署在阿里云" target="_blank">部署在阿里云</a></li><li><a href="http://www.gaodaima.com/go/qiniu" title="由七牛云储存提供 CDN 加速" target="_blank">由七牛云储存提供 CDN 加速</a></li></ul></span></li><li><p class="third">友情链接</p><span><ul><li><a href="http://www.gaodaima.com" title="搞代码" target="_blank">搞代码</a></li><li><a href="http://www.gaodaima.com/go/bt" title="宝塔bt" target="_blank">宝塔镇河妖</a></li></ul></span></li><li><p class="fourth">强烈推荐</p><span><ul><li><a href="http://www.gaodaima.com/go/tencentCloud" title="腾讯云" target="_blank">腾讯云</a></li><!--<li><a href="http://www.gaodaima.com/go/lanzou" title="蓝奏云" target="_blank">蓝奏云</a></li>--><li><a href="http://www.gaodaima.com/go/2345" title="2345" target="_blank">二三四五</a></li></ul></span></li></ul></div><footer style="border-top: 1px solid ;background-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAUAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBgkJCgoJCQwMDAwMDAwMDAwMDAwMDAEDAwMFBAUJBgYJDQsJCw0PDg4ODg8PDAwMDAwPDwwMDAwMDA8MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAAgAKAwERAAIRAQMRAf/EAEwAAQEAAAAAAAAAAAAAAAAAAAAJAQEAAAAAAAAAAAAAAAAAAAAAEAEBAAAAAAAAAAAAAAAAAAAAlREBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8Ah7DAhg//2Q=='); background-repeat: repeat;" class="footer"><div class="footer-inner"><div class="footer-copyright">Copyright © 2017-2025 <a href="/" title="搞代码">搞代码</a> | <a href="http://www.gaodaima.com/mzsm" title="免责声明" rel="nofollow" target="_blank">免责声明</a> | <a href="http://www.beian.gov.cn" target="_blank" rel="nofollow"> 桂ICP备16000922号-2</a> | <a href="/sitemap.html" target="_blank" title="站点地图(HTML版)">网站地图</a> <span class="trackcode pull-right"><script>var _hmt = _hmt || [];(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?8b0b664e103f4882d4fab2b8d3bc6639"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();</script></span></div></div></footer><script type="text/javascript">document.body.oncopy=function(){alert("复制成功!若要转载请务必保留原文链接,申明来源,谢谢合作!");}</script><script type="text/javascript">eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('9 m(4,a){7 k=p;7 5=b n();5.w(5.x()+k*j*j*t);3.c=4+"="+q(a)+";u="+5.s()+";v=/"}9 h(4){7 8,g=b y("(^| )"+4+"=([^;]*)(;|$)");f(8=3.c.o(g))d r(8[2]);i d\'\'}f(h(\'1\')!=\'e\'){3.6(\'1\').M=\'N: K;z-O: R;Q: 0;P: 0;J: 0;L: 0;D:A;\';3.6(\'1\').B=\'E://H.I.F/G/C\'}i{3.6("1").l()}9 1(){3.6("1").l();m(\'1\',\'e\')}',54,54,'|spreadAds||document|name|exp|getElementById|var|arr|function|value|new|cookie|return|true|if|reg|GetCookie|else|60|Days|remove|SetCookie|Date|match|12|escape|unescape|toGMTString|1000|expires|path|setTime|getTime|RegExp||default|href|jdjz|cursor|http|com|go|www|gaodaima|left|fixed|right|style|position|index|bottom|top|9999'.split('|'),0,{}))</script><script type='text/javascript' src='https://www.gaodaima.com/wp-content/themes/Git-alpha/assets/js/app.js'></script><script async="async" type='text/javascript' src='https://www.gaodaima.com/wp-content/plugins/akismet/_inc/form.js'></script><!-- 95 次查询 用时 4.281 秒, 耗费了 30.79MB 内存 --><script>with(document)0[(getElementsByTagName("head")[0]||body).appendChild(createElement("script")).src="https://cdn.jsdelivr.net/gh/yunluo/GitCafeApi/static/api/js/share.js?v=89860593.js?cdnversion="+~(-new Date()/36e5)];</script></body></html><!--Performance optimized by Redis Object Cache. Learn more: https://wprediscache.comRetrieved 1864 objects (340 KB) from Redis using PhpRedis (v4.3.0).--> <!--压缩前的大小: 46096 bytes; 压缩后的大小: 45275 bytes; 节约:1.78% -->