cURL / Mailing Lists / curl-users / Single Mail

curl-users

status not separated from content

From: noise factor <noisefactor_at_netscape.net>
Date: Sat, 07 Jun 2003 20:15:19 -0400

here's a glimpse of some trouble i'm having that shouldn't be
this bad. thanks for your consideration.
    Andy

in my script i'm using
$contents = shell_exec("curl -r 0-4096 -o - $url 2>&1");

where it is vital to have both the file and the alleged filesize.
so i must use the the status report or the verbose output, both of
which give this filesize total. the problems are the following:
A) this value should be a variable in the -w option format
B) when i capture the output with -o - the data runs together with
the status info in a way that makes it particularly difficult to
separate the two, for example:

4 29233 4 1368 0 0 331 0 0:01:28 0:00:04 0:01:24 331Falalalalalalalalalala file data...

for the sake of speed, i really shouldn't have to send this data to
the hard drive to separate curl's diagnostic data from the file data.
an endline character would help.

C) if i use -- gulp -- -s and -v to get the 29233 filesize total, i
then have to start guessing about what is in the file in order to
strip away the verbose curl comments, which don't even all begin with the same characters

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
Received on 2003-06-08