curl模拟登陆总结-创新互联

创新互联是一家集网站建设,繁昌企业网站建设,繁昌品牌网站建设,网站定制,繁昌网站建设报价,网络营销,网络优化,繁昌网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

$url = 'http://www.zixue.it/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes';

// $data = 'fastloginfield=email&username=490433117%40qq.com&password=zx199084&quickforward=yes&handlekey=ls';

$data['fastloginfield'] = 'email';

$data['username'] = '490433117@qq.com';

$data['password'] = 'zx199084';

$data['quickforward'] = 'yes';

$data['handlekey'] = 'ls';

$cookie = 'D:\WWW\day1\curl\cookie.txt';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);

curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);

curl_exec($ch);

$last_url = 'http://www.zixue.it/thread-12785-1-1.html';

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, $last_url);

curl_setopt($curl, CURLOPT_HEADER, 0);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie);

$content = curl_exec($curl);

$pattern = '/

最后登录<\/dt>
(?P.*?)<\/dd>/is';</p><p>if(preg_match($pattern, $content, $matches)){</p><p>$title = $matches['title'];</p><p>var_dump($title);</p><p>echo 'comeOning';</p><p>}</p><p>要抓取登陆的页面,,安装正常登陆数据格式填写</p><p align=center>另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、<a href="https://www.cdcxhl.com/gaofang/" target="_blank">高防服务器</a>、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。</p> <br> 当前题目:curl模拟登陆总结-创新互联 <br> 链接URL:<a href="http://dcwzsj.com/article/dcjhcs.html">http://dcwzsj.com/article/dcjhcs.html</a> </div> </div> <div class="other"> <h3>其他资讯</h3> <ul> <li> <a href="/article/ghddis.html">VLAN学习笔记</a> </li><li> <a href="/article/ghddgd.html">css列表样式是什么</a> </li><li> <a href="/article/ghddic.html">什么是Nginx</a> </li><li> <a href="/article/ghdddj.html">SAPQM检验批号码跳号该怎么处理</a> </li><li> <a href="/article/ghddih.html">基于lnmp的Discuz论坛</a> </li> </ul> </div> </div> <div class="footer"> <div class="contain"> <div class="foot-nav clearfix"> <ul class="footer-menu"> <li class="dropdown" ><a class="dropdown-toggle">服务范围<b class="caret"></b></a> <ul class="child-menu"> <li><a href="/website.html">网站建设</a></li> <li><a href="/weixin/" rel="nofollow">微信开发</a></li> <li><a href="/app/" rel="nofollow">APP开发</a></li> <li><a href="/design/" rel="nofollow">品牌设计</a></li> <li><a href="/market/" rel="nofollow">营销推广</a></li> </ul> </li> <li class="dropdown"><a href="/webcase/" class="dropdown-toggle" title=德昌县做网站案例>德昌县做网站案例<b class="caret"></b></a> <ul class="child-menu"> <li><a href="/webcase/jtssgslist.html" id="ctl00_show_85" title="集团上市公司">集团上市公司</a></li> <li><a href="/webcase/ppwzlist.html" id="ctl01_show_81" title="品牌网站">品牌网站</a></li> <li><a href="/webcase/xiangyingshilist.html" id="ctl02_show_82" title="响应式网站">响应式网站</a></li> <li><a href="/Marketingwebsite/index.html" id="ctl03_show_83" title="营销型网站">营销型网站</a></li> <li><a href="/waimaowangzhan/index.html" id="ctl04_show_84" title="外贸网站">外贸网站</a></li> </ul> </li> <li class="dropdown"><a href="/news/" class="dropdown-toggle">新闻中心 <b class="caret"></b></a> <ul class="child-menu"> <li><a href="/news/2.html" id="ctl00_show_70" title="德昌县网站建设">德昌县网站建设</a></li><li><a href="/news/3.html" id="ctl00_show_70" title="德昌县网站设计">德昌县网站设计</a></li><li><a href="/news/5.html" id="ctl00_show_70" title="德昌县网站制作">德昌县网站制作</a></li><li><a href="/news/6.html" id="ctl00_show_70" title="德昌县网站优化">德昌县网站优化</a></li> </ul> </li> <li class="dropdown"><a href="/Knowledge/" class="dropdown-toggle">知识学堂 <b class="caret"></b></a> <ul class="child-menu"> <li><a href="/websitelist/8.html" title="德昌县网站建设知识">德昌县网站建设知识</a></li><li><a href="/websitelist/9.html" title="德昌县网站设计知识">德昌县网站设计知识</a></li><li><a href="/websitelist/10.html" title="德昌县微信营销知识">德昌县微信营销知识</a></li><li><a href="/websitelist/11.html" title="德昌县营销推广知识">德昌县营销推广知识</a></li> </ul> </li> <li class="dropdown"><a href="/about/" class="dropdown-toggle" rel="nofollow">关于我们 <b class="caret"></b></a> <ul class="child-menu"> <li><a href="/about/jj/index.html" id="ctl00_show_1300" title="公司简介" rel="nofollow">公司简介</a></li> <li><a href="/about/history/index.html" id="ctl01_show_1301" title="发展历史" rel="nofollow">发展历史</a></li> <li><a href="/about/jjtd/index.html" id="ctl02_show_1302" title="精英团队" rel="nofollow">精英团队</a></li> <li><a href="/about/join/" rel="nofollow">加入我们</a></li> <li><a href="/about/contact/" rel="nofollow">联系翔捷宏鑫</a></li> </ul> </li> </ul> <dl class="last-dl"> <dt> <a href="javascript:;" title="联系我们" rel="nofollow">联系翔捷宏鑫</a> </dt> <dd class="conta"> <span><img src="/Public/Home/images/zg_ewm.png" width="100" /><br /> 企业微信号</span> </dd> </dl> </div> <div class="childcompan clearfix"> </div> <div class="copy"> 友情链接: <a href="https://www.cdcxhl.com/tuoguan/liantong/" title="成都联通服务器托管" target="_blank">成都联通服务器托管</a>   <a href="http://www.cdxwcx.cn/tuoguan/yidong.html" title="移动机房服务器托管" target="_blank">移动机房服务器托管</a>   <a href="https://www.cdcxhl.com/mianfei/jianzhan/chengdu.html" title="成都免费建站" target="_blank">成都免费建站</a>   <a href="http://www.zyfdjwx.com/" title="资阳发电机" target="_blank">资阳发电机</a>   <a href="http://www.sxjierui.cn/" title="双流网站建设" target="_blank">双流网站建设</a>   <a href="http://m.cdcxhl.cn/dingzhi/ " title="定制网站开发" target="_blank">定制网站开发</a>   <a href="http://www.wzyarui.cn/" title="成都户外广告" target="_blank">成都户外广告</a>   <a href="http://www.csruijie.cn/" title="成都公司变更" target="_blank">成都公司变更</a>   <a href="http://www.myfdjzy.com/" title="夏季POLO衫" target="_blank">夏季POLO衫</a>   <a href="http://seo.cdkjz.cn/mobile/" title="手机网站建设" target="_blank">手机网站建设</a>    </div> <br> 123ABC<strong> <a href="/">德昌县网站建设</a></strong>,德昌县定制网站建设——全心全意建网站公司 </div> </div> <script type="text/javascript" src="/Public/Home/js/meiqia.js"></script> <script type="text/javascript" src="/Public/Home/js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="/Public/Home/js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="/Public/Home/js/i.js"></script> <script type="text/javascript" src="/Public/Home/js/script.js"></script> <script type="text/javascript" src="/Public/Home/js/SuperSlide.js"></script> <script type="text/javascript" src="/Public/Home/js/jquery.toTop.min.js"></script> <script type="text/javascript" src="/Public/Home/js/num-change.js"></script> <script type="text/javascript" src="/Public/Home/js/jquery.nicescroll.min.js"></script> <script type="text/javascript"> $(".menu li").eq(7).addClass("current-menu-item"); </script> </body> </html> <script> $(".con img").each(function(){ var src = $(this).attr("src"); //获取图片地址 var str=new RegExp("http"); var result=str.test(src); if(result==false){ var url = "https://www.cdcxhl.com"+src; //绝对路径 $(this).attr("src",url); } }); window.onload=function(){ document.oncontextmenu=function(){ return false; } } </script>