How to implement PHP simulation login _php Tutorial

Source: Internet
Author: User

How to implement PHP simulation login


PHP simulation Landing Implementation method, here are listed two ways to achieve the simulation landing Renren. The specific instance code is as follows:

(1) Using Snoopy to simulate login

 
  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 '] = ' login account '; $submit _vars[' password '] = ' login password '; $url = ' http://www.renren.com/PLogin.do ';// Login data submitted URL address $snoopy->submit ($url, $submit _vars); $snoopy->fetch ("http://www.renren.com/");//The page data you want to get echo $ Snoopy->results;//www.phpernote.com

(2) Using curl to simulate landing

 

Articles you may be interested in

    • Summary of how PHP simulates post requests
    • PHP asynchronous execution method, analog multithreading
    • How to simulate the ping command in PHP
    • How to set phpMyAdmin automatic login and cancel auto sign-in
    • PHP impersonation sends a GET request
    • phpMyAdmin How to set up automatic login
    • PHP simulates sending get and post requests separately
    • PHP window Platform Simulation CHECKDNSRR function detects if email is real

http://www.bkjia.com/PHPjc/918384.html www.bkjia.com true http://www.bkjia.com/PHPjc/918384.html techarticle PHP simulation Landing Implementation method of PHP simulation Landing, here are listed two ways to realize the simulation landing Renren. The specific example code is as follows: (1) using Snoopy simulation login ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.