Minase Posted January 18, 2011 Share Posted January 18, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/224847-curl/ Share on other sites More sharing options...
AbraCadaver Posted January 18, 2011 Share Posted January 18, 2011 In short, this is why they have this value so you can't do what you're trying to do 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. Quote Link to comment https://forums.phpfreaks.com/topic/224847-curl/#findComment-1161404 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.