helloxielan 2010-06-23 20:38 采纳率: 0%
浏览 53

CURL PHP AJAX请求

I'm new to using CURL, but I have successfully got it to submit ordinary forms in the past. I'm working with a website that uses an AJAX Request to perform a login, I can get the form to fill out the username and password but since the login button is actually a link I can't get the form to submit, is there some other way I could login?

I actually looked into how users log into the site when javascript is disabled, thinking that they may have offered an alternative login route. However, the developers responded with the statement that the site is not functional when the user has javascript disabled. Since this is the case, perhaps this is not even possible with cURL?

Any advice on how I should proceed would be MUCH appreciated, thanks alot!

  • 写回答

1条回答 默认 最新

  • weixin_33736649 2010-06-23 20:45
    关注

    Figure out where the AJAX method submits to. It might be in the action parameter of a form tag, or it could potentially be buried in javascript somewhere.

    You could use a firefox extension like FireBug or HttpFox to observe what the browser does when you click the "log in" link. It probably generates some kind of POST request. Examine what that post does, figure out how to send an equivalent request via curl, and you're done.

    评论

报告相同问题?

悬赏问题

  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?