Snoopy Analog Login Issues
PHP Code
<title>New Document</title>
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 user name $submit_vars["password"] = "Your password"; Your password $submit_vars["QuestionID"] = "0"; $submit _vars["answer"] = ""; $submit _vars["loginsubmit"] = "login";//$submit _vars["loginsubmit"] = "DL"; Can//$submit _vars["loginsubmit"] = ""; No//Question 1: Why join the above sentence: $submit _vars["loginsubmit"] = "Login", and "login" to any word can be, but "" Can not $snoopy->submit ($submit _url,$ Submit_vars); Echo $snoopy->results;//Issue 2: Jump to http://127.0.0.1/snoopy/index.php?> after successful login
------Solution--------------------
1. This field is a hidden field of the form, such as: .
2. This is determined by the processing script after the form is submitted, according to your case, the later judgment is used!empty ($_post[loginsubmit]), not Snoopy problem.
3. $snoopy->submit ($submit _url, $submit _vars);
$snoopy->fetch (' http://www.phpx.com/happy/index.php ');//Crawl the final page directly
Echo $snoopy->results;