Javascript-html-PHP simulates logon to the company's CRM system and interacts with each other. The logon interface adopts Ajax verification and submits

Source: Internet
Author: User
PHP simulates logon to the company's CRM system and interacts with each other. The logon interface adopts Ajax for verification and submission. The cURL is not successful. The webpage link: crm.pzoom.com to find a solution! & Amp; lt ;? Phpfunctionrequest_by_curl ($ remote_server, $ post_string) {code ...}... PHP simulation login company CRM system and interaction, login interface using Ajax verification and submit, tried cURL failed, Page Link: https://crm.pzoom.com
Find a solution!

Function request_by_curl ($ remote_server, $ post_string)
{

$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $remote_server);curl_setopt($ch, CURLOPT_POSTFIELDS, 'mypost=' . $post_string);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_USERAGENT, "Jimmy's CURL Example beta");$data = curl_exec($ch);curl_close($ch);return $data;

}

Echo (request_by_curl ("https://crm.pzoom.com/Index/checkform", 'userid = username & userpwd = password '));
?>

Returned result: {"state": 1, "msg": "\ u7528 \ u6237 \ u540d \ u6216 \ u5bc6 \ u7801 \ u9519 \ u8bef \ uff01 "}

Reply content:

PHP simulation login company CRM system and interaction, login interface using Ajax verification and submit, tried cURL failed, Page Link: https://crm.pzoom.com
Find a solution!

Function request_by_curl ($ remote_server, $ post_string)
{

$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $remote_server);curl_setopt($ch, CURLOPT_POSTFIELDS, 'mypost=' . $post_string);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_USERAGENT, "Jimmy's CURL Example beta");$data = curl_exec($ch);curl_close($ch);return $data;

}

Echo (request_by_curl ("https://crm.pzoom.com/Index/checkform", 'userid = username & userpwd = password '));
?>

Returned result: {"state": 1, "msg": "\ u7528 \ u6237 \ u540d \ u6216 \ u5bc6 \ u7801 \ u9519 \ u8bef \ uff01 "}

Curl postUserid = username & userpwd = PasswordTo/Index/checkformLook

The address of your post request is https.

curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);

In addition'mypost=' .Remove

An ajax request is successfully submitted to/Index/selectMedia. There is no verification code, and there is no token ..

Submitted by ajax

Translated for you:

{"State": 1, "msg": "The user name or password is incorrect! "}

Find the reason in the code.

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.