elitegosu Posted June 3, 2010 Share Posted June 3, 2010 Hello, I've been trying to figure out how to get all form input parameters from the form submit using curl post for the past couple of hours without any luck. For example, here is what firebug is showing when I submit an empty form on one of the web sites: Parameters: birthDay 0 birthMonth 0 birthYear 0 city country US email firstName gender F lastName locale en_US password recaptcha_challenge_field 03AHJ_Vut1SDTkz_unIKB8DJKlN3ZkSUZvK5GE-tFtLHYRyW2APR_Q2N8NkXeAO8igQneIFHUlJ-fpeXcoH4GaHwA9-23khASLBCvOfzNnRkcBf-tct8nQDNyN-1JufeoN8FRcw9nQgImF3NaK5RHIAtCgnD_rkkaNbw recaptcha_response_field zipCode And here is a string from livehttpheaders: firstName=&lastName=&gender=F&birthMonth=0&birthDay=0&birthYear=0&country=US&city=&zipCode=&locale=en_US&email=&password=&recaptcha_challenge_field=03AHJ_VuvWuSCo4NdBfCmXcB4_JgoE2BhmDbK34b4YzlmtkGvEOuWy19yFLmuae5v-0YrW1Qb8BCGbRSI3iinD9odIm095VmZ2a4wEkFoFT2nt3Eo75_k_waqxjyePPl4Segl9F07-48H2TDZ2_4c3L6mGfKpxJfjOfg&recaptcha_response_field= Both applications show that its possible to extract all necessary form input fields when the form is submitted, however I can't figure out how to do this in php. I've been trying to use CURLOPT_POST, 1 and I tried submitting empty string using CURLOPT_POSTFIELDS and also tried turning CURLOPT_POSTFIELDS off, but I still can't extract the default post fields. What I don't want is to use regex to match every form on a site (and all the input fields), it would make my life so much easier if I could just parse form action url and then extract all the necessary parameters from it. I will greatly appreciate any help on this. Quote Link to comment https://forums.phpfreaks.com/topic/203796-extracting-form-input-parameters-from-form-post/ Share on other sites More sharing options...
ignace Posted June 4, 2010 Share Posted June 4, 2010 Both applications show that its possible to extract all necessary form input fields when the form is submitted, however I can't figure out how to do this in php. You can't retrieve those values if you didn't submit the form yourself. And cURL can't submit a form, it can however provide the POST data generated by a form to the processing script. Quote Link to comment https://forums.phpfreaks.com/topic/203796-extracting-form-input-parameters-from-form-post/#findComment-1067556 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.