curl-users
RE: get error_state
From: ìÅ×ÞÅÎËÏ ëÉÒÉÌÌ óÅÒÇÅÅ×ÉÞ <levchenko.ks_at_nsk.vtb24.ru>
Date: Wed, 11 Feb 2009 08:34:13 +0300
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