PHP Auto-Submit Form Login Solution

Source: Internet
Author: User
PHP Auto-Submit Form Login
Implementation function: Use COM's internetexplorer.application, to control the IE space to automatically fill out form login. In other pages can be automatic login, but in the bottom of this site is not login. Solution?

$Browser = new COM (' internetexplorer.application ');
$Browserhandle = $Browser->hwnd;
$Browser->visible = true;
$f 1_url = "HTTP://WWW.MARRIOTT.COM.CN/DEFAULT.MI";
$Browser->navigate ($f 1_url);
while ($Browser->busy) {
Com_message_pump (4000);
}
Sleep (5);
$Browser->document->getelementbyid (' Header-my-account-userid ')->focus ();
$Browser->document->getelementbyid (' Header-my-account-userid ')->value = "[email protected]";
$Browser->document->getelementbyid (' Header-my-account-password ')->focus ();
$Browser->document->getelementbyid (' Header-my-account-password ')->value = "wuweiqun6811695";
$Browser->document->getelementbyid (' header-my-account-sign-in ')->focus ();
$Browser->document->getelementbyid (' header-my-account-sign-in ')->click ();

echo "OK";
$Browser->quit ();
?>
------Solution--------------------
Landlord can try to put the user name password into the encrypted cookie, and then from the cookie to get the login information, if OK on the landing successful
------Solution--------------------
Can only be controlled by painting.
------Solution--------------------
Change a page login HTTPS://WWW.MARRIOTT.COM.CN/CHANNELS/REWARDS/SIGNIN-CN.MI
  • 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.