NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail.
Aren't there any way to download files as below?
For example, I want to download all .html files under the root directory of unix.com/
curl -O https://www.unix.com/*.html
This won't work, but please tell me the way to do this.
Well, the best way is to get the file list of the directory, but i... (6 Replies)
Hi guys ,
need some help
I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility.
Thanks
Sandeep (0 Replies)
I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility.
Regards
Sandeep (0 Replies)
Hello,
I try to take out of the command curl the info of the time...
time curl --write \"Downloaded %{time total}\" -o ......
but having some problem. (1 Reply)
Hi,
Has anyone installed curl on solaris? I tried installing curl-7.19.4 without any effect.
Here's what i have done so far:
Copied the package curl-7.19.4-sol8-sparc-local under a certain dir.
Tried to add the path in PATH variable.
But when I type curl it says bash: curl: command not found.... (2 Replies)
Hello everyone
I'm currently using a script to upload files (different file names, but same date) to an ftp server (see below)
#!/bin/sh
# Set the variables
HOST=<host>
USER=<user>
PASSWD=<password>
ftp -i -n $HOST <<END_SCRIPT
user ${USER} ${PASSWD}
mput... (0 Replies)
Hi,
I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command:
/usr/local/bin/curl -v... (1 Reply)
Hello,
I am using curl command to interact with the FTP server. I have gathered some information around downloading / uploading of files using curl command.
However, I couldn't find any information around
1) Listing all the files on FTP server in any given folder having a specific extn.
(... (3 Replies)
Hi all
so I'm new to scripting but I am making a script that is a url shortener. It will take a url off the command line and spit back the shortened version using bit.ly's api
this is what I have so far
if
then
echo "You must supply a URL."
exit 1
fi
read url... (3 Replies)
Topic : cmd to check status of url using Curl
I have below 2 lines which r working fine
/usr/bin/curl -u user:pasword http://hostname
/usr/bin/curl -connect-timeout=10 http://hostname
Now I want to use user:pasword and connect-timeout parameter in one line
/usr/bin/curl -u user:pasword... (1 Reply)
Discussion started by: sam@sam
1 Replies
LEARN ABOUT PHP
curl_version
CURL_VERSION(3) 1 CURL_VERSION(3)curl_version - Gets cURL version informationSYNOPSIS
array curl_version ([int $age = CURLVERSION_NOW])
DESCRIPTION
Returns information about the cURL version.
PARAMETERS
o $age
-
RETURN VALUES
Returns an associative array with the following elements:
+-------------------+-------------------------------------------------+
| Indice | |
| | |
| | Value description |
| | |
+-------------------+-------------------------------------------------+
| version_number | |
| | |
| | cURL 24 bit version number |
| | |
| version | |
| | |
| | cURL version number, as a string |
| | |
|ssl_version_number | |
| | |
| | OpenSSL 24 bit version number |
| | |
| ssl_version | |
| | |
| | OpenSSL version number, as a string |
| | |
| libz_version | |
| | |
| | zlib version number, as a string |
| | |
| host | |
| | |
| | Information about the host where cURL was built |
| | |
| age | |
| | |
| | |
| | T{ features |
| | |
| | A bitmask of the CURL_VERSION_XXX constants |
| | |
| protocols | |
| | |
| | An array of protocols names supported by cURL |
| | |
+-------------------+-------------------------------------------------+
EXAMPLES
Example #1
curl_version(3) example
This example will check which features that's available in cURL build by using the 'features' bitmask returned by curl_version(3).
<?php
// Get curl version array
$version = curl_version();
// These are the bitfields that can be used
// to check for features in the curl build
$bitfields = Array(
'CURL_VERSION_IPV6',
'CURL_VERSION_KERBEROS4',
'CURL_VERSION_SSL',
'CURL_VERSION_LIBZ'
);
foreach($bitfields as $feature)
{
echo $feature . ($version['features'] & constant($feature) ? ' matches' : ' does not match');
echo PHP_EOL;
}
?>
PHP Documentation Group CURL_VERSION(3)