curl-users
RE: get error_state
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 11 Feb 2009 07:37:42 +0100 (CET)
Date: Wed, 11 Feb 2009 07:37:42 +0100 (CET)
On Wed, 11 Feb 2009, Левченко Кирилл Сергеевич wrote:
> How to get the file and http_code to different variables?
> I do:
> $file=`curl $url/KbrInterface/system/Main.aspx?Method=Download" -w
> '%{http_code}'`
> As a result, the variable $file is located and the server's response, and
> the error code
By storing the file in a separate file. Like...
curl -o file -w '%{http_code}' [URL] > httpcodedump
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-02-11