Hi,
Is there an option to make curl not get the HTML? I just want it to get the cookie of a page.
Also, how can I submit a form with curl using PHP? I know what data needs to be sent.
Thanks!
Make a HEAD request instead of POST or GET. The server should only send back the headers (including Cookie: headers). I guess with PHP's cURL interface you'd use this [man]curl-setopt[/man] option:
CURLOPT_NOBODY: Set this option to a non-zero value if you don't want the body included with the output.