php模拟登陆的实现方法_PHP教程

WBOY
Release: 2016-07-13 10:12:54
Original
1121 people have browsed it

php模拟登陆的实现方法

php模拟登陆的实现方法,这里分别列举两种方法实现模拟登陆人人网。具体实例代码如下:

(1)使用snoopy模拟登陆

referer='http://www.renren.com/'; $snoopy->agent="Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0"; $submit_vars['email'] ='登陆账号'; $submit_vars['password'] ='登陆密码'; $url='http://www.renren.com/PLogin.do';//登陆数据提交的URL地址 $snoopy->submit($url,$submit_vars); $snoopy->fetch("http://www.renren.com/");//希望获取的页面数据 echo $snoopy->results;//www.phpernote.com
Copy after login

(2)使用curl模拟登陆


        
Copy after login

您可能感兴趣的文章

  • php模拟post请求的方法总结
  • PHP 异步执行方法,模拟多线程
  • php模拟ping命令的方法
  • 如何设置phpmyadmin自动登陆和取消自动登录
  • php模拟发送get请求
  • phpmyadmin如何设置自动登陆
  • php分别模拟发送GET和POST请求
  • php window平台模拟checkdnsrr函数检测email是否真实存在

www.bkjia.com true http://www.bkjia.com/PHPjc/918384.html TechArticle php模拟登陆的实现方法 php模拟登陆的实现方法,这里分别列举两种方法实现模拟登陆人人网。具体实例代码如下: (1)使用snoopy模拟登陆...
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!