hello hackers.
i have a curl process running as cgi directly pushing stdout to the client. but i want to additionally save that stream to a file at the same time.
any directions madly welcome.
thanks in advance (3 Replies)
hi,
new to scripting and would like to know how can I have a script which will curl a few URLs and have the results such as the URLs being curled, dns lookup time, connection time, total time, etc save in a html format in a form of table with column and rows.
thank you. (4 Replies)
This is about to drive me crazy. What I want to do is simple:
output ALL the verbose information from curl to a file
I have read the manual, tried several options and searched this forum but no salvation...
I'm using
curl -k -Q "command" --user user:passwd --ftp-pasv --ftp-ssl -v... (1 Reply)
ls -lrt | nawk -v D="$(date +'%b%e:'| sed 's/ //g')" 'D==$6$7":"{sub(".*"$9,$9);print}'
This picks only the latest files created based on the timestamp for that particular day..
how do i copy over the same files to a different location???? (1 Reply)
Hi,
I'm trying to write a script to download RedHat's errata digest.
It comes in a txt.gz format, and i can get it easily with firefox.
HOWEVER: output is VERY strange when donwloading it in a script. It seems I'm getting a file of the same size - but partially text and partly binary! It... (5 Replies)
i use curl and wget quite often.
i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget".
the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in... (3 Replies)
Hello guys,
I'm writing a little script which sends me sms with my shell script via api of a sms provider.
problem is I can't filter my curl output for this site:
site url:... (1 Reply)
Hello.
I use curl to fetch a website, then, I want to extract the URLs from this curls output.
I tried both sed and grep, but couldnt figure it out.
Ive tried : sed -n 's/href="\(*\).*/\1/p' results.txt
and grep -o
grep -o '<a href="http://*.*.*/*">' results.txt.
What pattern... (6 Replies)
find /app/data -name "Availability" -
Below is the output now i need to filter based on latest modified timestamp.
I know 3 is the latest modified time stamp but i tried different options but only filtering docs and not on headnote..Can any one tell me how to do that..
... (2 Replies)
How can I get the name of the default output filename from curl using the argument -O?
Using -o one can choose a filename. I want to get the name of the original file, but don't understand how to get it.
curl -o filename http://www.website.com
curl -O http://www.website.com
The... (3 Replies)
Discussion started by: locoroco
3 Replies
LEARN ABOUT MOJAVE
curlopt_upload
CURLOPT_UPLOAD(3) curl_easy_setopt options CURLOPT_UPLOAD(3)NAME
CURLOPT_UPLOAD - enable data upload
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UPLOAD, long upload);
DESCRIPTION
The long parameter upload set to 1 tells the library to prepare for and perform an upload. The CURLOPT_READDATA(3) and CURLOPT_INFILE-
SIZE(3) or CURLOPT_INFILESIZE_LARGE(3) options are also interesting for uploads. If the protocol is HTTP, uploading means using the PUT
request unless you tell libcurl otherwise.
Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with CURLOPT_HTTPHEADER(3) as
usual.
If you use PUT to a HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding.
You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER(3). With HTTP 1.0 or without chunked transfer,
you must specify the size.
DEFAULT
0, default is download
PROTOCOLS
Most
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
/* we want to use our own read function */
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile");
/* now specify which pointer to pass to our callback */
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
/* Set the size of the file to upload */
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)fsize);
/* Now run off and do what you've been told! */
curl_easy_perform(curl);
}
AVAILABILITY
Always
RETURN VALUE
Returns CURLE_OK
SEE ALSO CURLOPT_PUT(3), CURLOPT_READFUNCTION(3), CURLOPT_INFILESIZE_LARGE(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_UPLOAD(3)