Home > Backend Development > PHP Tutorial > PHP curl关于异步提交的有关问题

PHP curl关于异步提交的有关问题

WBOY
Release: 2016-06-13 12:04:28
Original
1075 people have browsed it

PHP curl关于异步提交的问题

本帖最后由 joebnb 于 2014-06-30 17:34:21 编辑 今天看了个教程,关于curl模拟登陆的,按照教程能够顺利登陆form提交的网站

然后自己想动手试试,于是找了个网站试验了下...结果跪了,网站是异步提交的,就是他们用POST还是get的看不懂...
希望版主能帮我改改,程序

连接地址是这个:http://www.xinshangmeng.com
这个是异步的js:
http://www.xinshangmeng.com/xsm2/compress/index-all.js?v=2014052300
这个事JS代码排版的工具:
http://tool.chinaz.com/Tools/JsFormat.aspx


<?php<br /><br />$url='http://www.xinshangmeng.com/xsm2/index.html?v=20140430';<br />$cookie_file=tempnam('./temp','cookie');<br />$post_fileds='username=1111&password=1111';<br /><br /><br />$ch = curl_init($url);<br />curl_setopt($ch,CURLOPT_HEADER,0);<br />curl_setopt($ch,CURLOPT_RETURNTRANSFER,0);<br />curl_setopt($ch,CURLOPT_POST,1);<br />curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie_file);<br />curl_setopt($ch,CURLOPT_POSTFIELDS,$post_fileds);<br />curl_exec($ch);<br />curl_close($ch);<br />?>
Copy after login


谢谢啦
------解决方案--------------------
额..  帮你顶。   我连cURL都不会,  所以麻烦你能帮我看下我的这个问题吗http://bbs.csdn.net/topics/390824224  谢谢
------解决方案--------------------
这个网站在登录时用到验证码,基本无解
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template