Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- POSTing a form programatically with cURL
- Grey Alien
July 12, 2007, 7:42 am
rate this thread
ng would be the most appropriate.
I am trying to programatically POST an ASP form, to allow me to log on
to a site programatically.
<form name="aspnetForm" method="post" action="Default.aspx"
<input name="_ct99:Content:UsrName" type="text"
<input name="_ct99:Content:Pwd" type="password"
<input type="submit" name="_ct99:Content:btnLogon" value="Logon"
<input id="_ct99_Content_SavePwd" type="checkbox"
Could anyone please specify the data I should pass with the
CURLOPT_POSTFIELDS flag option (i.e. passed to curl_easy_setopt()) ?
I have not been succesful so far in trying to log on.
Re: POSTing a form programatically with cURL
on 07/12/2007 04:42 AM Grey Alien said the following:
I rarely use Curl, only as fallback for when it is not possible to
execute SSL fsockopen requests for some reason.
What I use is this HTTP client class that abstracts me everything about
an HTTP connection. Submitting a form just requires me to pass an
associative array with field names and their values. Take a look at the
Metastorage - Data object relational mapping layer generator
PHP Classes - Free ready to use OOP components written in PHP