开发者

Login Javascript within PHP

开发者 https://www.devze.com 2023-01-08 19:42 出处:网络
I have been creating a web scraper for an internal application with PHP but one of开发者_StackOverflow the pages has a JavaScript login is there any way of autonomously logging in to scrape the data a

I have been creating a web scraper for an internal application with PHP but one of开发者_StackOverflow the pages has a JavaScript login is there any way of autonomously logging in to scrape the data as usual?

(I am using curl to log in to the other two sites)


Use Firebug to check out what does browser send to server. After it you can do the same requests with curl.


There are many ways to implement a JavaScript login interface. Your question does not provide enough information to answer definitively.

Most JavaScript login interfaces are just logging in over AJAX. So it's just an asynchronous POST request that contains the login info. That can be faked using the proper headers. Install a browser plugin that lets you monitor HTTPS requests and you'll be able to see what headers and other form data to send.

0

精彩评论

暂无评论...
验证码 换一张
取 消