bschultz Posted June 17, 2021 Share Posted June 17, 2021 (edited) I had a script to automatically login to a site, and download data from it. The provider just updated their pages. They now appear to be JSON. The previous code was straight php and curl. When trying to login now, I get this error page echoed: 405 - HTTP verb used to access this page is not allowed. Any pointers as to where I can look to re-write the code based on this error? I'm not looking for someone to write the code for me...just a pointer to where to look for how to login to this site. FYI, the site is: https://www.premiereaffidavits.com/login Thanks! Edited June 17, 2021 by bschultz Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/ Share on other sites More sharing options...
requinix Posted June 17, 2021 Share Posted June 17, 2021 Given that it's apparently Javascript now, you're going to have to use your browser to watch what happens when you perform the assorted actions you need to automate. Going to be pretty much impossible to tell you in more detail since it's all behind a login gate. Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/#findComment-1587289 Share on other sites More sharing options...
bschultz Posted June 17, 2021 Author Share Posted June 17, 2021 I can give you temp login info if needed...thanks! Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/#findComment-1587290 Share on other sites More sharing options...
requinix Posted June 17, 2021 Share Posted June 17, 2021 Hopefully won't be necessary. Give it a shot. Watch the HTTP requests being made and the responses returned. Good news is that since it's Javascript a lot of things will probably be JSON instead of HTML you'll have to parse. Then repeat what you see with cURL. Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/#findComment-1587291 Share on other sites More sharing options...
bschultz Posted June 17, 2021 Author Share Posted June 17, 2021 I tried the first page...using Firefox Developer Tools...and then changed the code to use the new page and post info...and the login page gave me the error I first posted...and I was lost! Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/#findComment-1587292 Share on other sites More sharing options...
requinix Posted June 17, 2021 Share Posted June 17, 2021 405 means you used the wrong method, as in GET and POST, for what the page is supposed to use. You have to match exactly what the browser did. Quote Link to comment https://forums.phpfreaks.com/topic/312923-php-curl-or-json-login/#findComment-1587293 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.