curl-and-php
Re: curl, asp.net and login forms
Date: Fri, 9 Jun 2006 10:36:50 +0200 (CEST)
On Fri, 9 Jun 2006, Daniel Vrabioiu wrote:
> $postData[ 'ProcForm' ] = "Process";
> $postData[ 'userid' ] = "0";
> $postData[ 'Join' ] = 2;
...
> curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
If I recall things correctly, the PHP/CURL will convert that into a multipart
formpost...
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 174
> ProcForm=Process&userid=0&Join=2&CheckCookie=1 [...snip...]
> login=Sign+In+%3E
... and this certainly is not multipart!
> Does curl encodes the headers to look same way as firefox encodes them ?
No, not unless you don't make them use the same kind of POST! ;-)
> Could this be the problem?
Yes, it will most certainly be.
> Any suggestion are greatly appreciated,
Convert the POST to a plain normal one.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2006-06-09