javascript-html - PHP模拟登录公司CRM系统并进行交互,登录界面采用Ajax验证并提交的

2025-09-07

php模拟登录公司crm系统并进行交互,登录界面采用ajax验证并提交的,试过curl没成功,页面链接:https://crm.pzoom.com
求解决方案!

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=用户名&userpwd=密码'));
?>

返回的结果是:{"state":1,"msg":"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\uff01"}

立即学习“PHP免费学习笔记(深入)”;

回复内容:

php模拟登录公司crm系统并进行交互,登录界面采用ajax验证并提交的,试过curl没成功,页面链接:https://crm.pzoom.com
求解决方案!

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=用户名&userpwd=密码'));
?>

返回的结果是:{"state":1,"msg":"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\uff01"}

立即学习“PHP免费学习笔记(深入)”;

curl post userid=用户名&userpwd=密码到/Index/checkform看看

你这个post请求的地址是https的,加上这个

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

另外把你的'mypost=' .去掉

一个ajax提交 成功了跳转到/Index/selectMedia 没验证码没什么token 没见过这么简单的东西了。。

ajax提交的吧

给你翻译了一下:

{"state":1,"msg":"用户名或密码错误!"}

到代码里去找原因吧

标签: crm系统登录界面

本文地址:https://www.shjdjh.com/news/213281.html

免责声明:本站内容仅用于学习参考,信息和图片素材来源于互联网,如内容侵权与违规,请联系我们进行删除,我们将在三个工作日内处理。联系邮箱:cloudinto#qq.com(把#换成@)