Snoopy simulated logon problems

Source: Internet
Author: User
Snoopy simulated logon PHPcode & lt; HTML & gt; & lt; HEAD & gt; & lt; TITLE & gt; NewDocument & lt;/TITLE & gt; & lt; metahttp-equiv = & quot; Content-Type & quot; content = & quot; te snoopy simulated logon
PHP code
     New Document  
     
  Fetchform ("http://www.phpx.com/happy/logging.php? Action = login "); echo $ snoopy-> results ."
"; */$ Submit_url =" http://www.phpx.com/happy/logging.php? Action = login "; $ submit_vars [" cookietime "] =" 2592000 "; $ submit_vars [" loginfield "] =" username "; $ submit_vars ["username"] = "your username"; // your username $ submit_vars ["password"] = "your password "; // your password $ submit_vars ["questionid"] = "0"; $ submit_vars ["answer"] = ""; $ submit_vars ["loginsubmit"] = "login "; // $ submit_vars ["loginsubmit"] = "dl"; // Yes // $ submit_vars ["loginsubmit"] = ""; // no // Question 1: why should I add the above sentence: $ submit_vars ["loginsubmit"] = "Login", and "login" can be changed to any word, but "" cannot $ snoopy-> submit ($ submit_url, $ submit_vars); echo $ snoopy-> results; // Question 2: After successful logon, the system jumps to http: // 127.0.0.1/snoopy/index. php?>




------ Solution --------------------
1. this field is a hidden field of the form, such: .
2. this is determined by the processing script after the form is submitted. as you said, it will be used for later judgment! Empty ($ _ POST [loginsubmit]) is not a Snoopy problem.
3. $ snoopy-> submit ($ submit_url, $ submit_vars );
$ Snoopy-> fetch ('http: // www.phpx.com/happy/index.php'); // directly capture the final page
Echo $ snoopy-> results;

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.