Jump to content

Curl


Minase

Recommended Posts

hy all long time no see :)

recently i did find this problem

i'm trying to login to a webpage with curl ,but without success ,ofcourse the basic posting is not the problem xD but the page have a hidden field (for security) so everytime you load the page it changes so post wont work if you first use get to take the page and extract the hash from it.

 

the page contains something like

input type= hidden value=A RANDOM VALUE THAT CHANGES EVERYTIME

 

without that value passed to post it wont login.

 

anyone knows how can i pass it so the post will be valid?

thank you

Link to comment
https://forums.phpfreaks.com/topic/224847-curl/
Share on other sites

In short, this is why they have this value so you can't do what you're trying to do  :o

 

Most likely they are sending a cookie on the first request and storing the hidden value in a session tied to that cookie on the remote server.  Then when you post the server is requesting the cookie to identify the session and looking up the value and comparing it with what is submitted on the form.

 

You may be able to accept and present cookies with curl to get it to work but I have never used cookies with curl.

Link to comment
https://forums.phpfreaks.com/topic/224847-curl/#findComment-1161404
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.