cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

RE: get error_state

From: Daniel Stenberg <daniel_at_haxx.se>
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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET