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: <levchenko.ks_at_nsk.vtb24.ru>
Date: Wed, 11 Feb 2009 08:34:13 +0300

 
> You're looking for the -w / --write-out option, described in the manual, I
think. So perhaps `curl -w '%{http_code}' URL` is what you're looking for.

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
-------------------------------------------------------------------
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