Questions tagged as ['curl']
Recently I found myself with a website (Prestashop e-commerce on a Centos PHP-FPM /Apache / MySql machine ) that was down and not responding to web requests.
After investigation, issue was due to an API call made with php-curl towards an endpoint that was temporarily offline, inside an application PHP file that was recalled in all pages of the website.
The cURL call had been wrongly made without a C ...
I followed the instructions here https://www.zabbix.com/download?zabbix=5.4&os_distribution=red_hat_enterprise_linux&os_version=8&db=mysql&ws=apache to install Zabbix 5.4 Mysql/Apache on my RHEL 8 server.
When i tried to install the package with sudo dnf install zabbix-server-mysql
(or with yum) , i got this error :
Errors during downloading metadata for repository 'zabbix':
- Curl ...

I using this curl request for sending data to API :
curl --location --request POST 'MY_IP' \
--header 'Content-Type: text/plain' \
--data-raw ' [{
"event_id": "123",
}]
'
I want to check the API performance by sending request asynchronously and measure the time take I tried to use xargs -P 10
which say send 10 request parallel but not able to do so ? Any help and how I can measure time ?

I have this working ldapsearch
command for connecting anonymously to an internal ldap server:
$ ldapsearch -h my.host -p 389 -x -LLL -s base -b "" namingContexts
dn:
namingContexts: DC=org,DC=sample
Now I would like to list the same using curl:
$ curl -v "ldap://my.host:389/dc=org,dc=sample namingContexts"
* Trying ...
* Connected to my.host (....) port 389 (#0)
* LDAP remote: search failed Success 00 ...
I have a client [Windows 10 VM] and a server [say a linux based VM].
I have Apache running on the Linux Server.
I have a file on the linux server that I want to download on my windows client.
I want to do it in 2 ways from the windows CMD: -Using curl -using wget
I tried the foll commands on my windows CMD. But doesnt work. Is something wrong with my CLI?
curl http://x.x.x.x/home/abc/ -O test.zip
wge ...
I have a gitlab community edition hosted on a server, and when using curl on this server to fetch this local gitlab website, I get an expired certificate error even if the dates are valid:
curl --insecure -vvI https://gitlab.mysite.com 2>&1 | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'
* Server certificate:
* subject: CN=gitlab.mysite.com
* start d ...

I am writing a shell script which uses curl(1)
to download files. By default curl will set a HTTP User-Agent
(UA) to something like curl/7.74.0
. I want to be a good internet citizen and set the UA to say what my script is. Since the software that is making HTTP requests is still curl, I would like this user agent to also include the default curl UA.
I can replace User-Agent
with -A
, but is it possible ...
I have a custom wordpress "client" plugin that makes a cURL call to a Node app on an Ubuntu server.
The call works perfectly from every WP installation, except for one where everything worked fine until yesterday then the following cURL call suddenly started to return a
Failed to connect to x.x.x.x port 3344 after 1040 ms: Connection refused.
$curl = curl_init();
curl_setopt_array($curl, array(
...
I'm trying to send a POST request to one of my websites which uses Cloudflare.
but it returns Failed to connect to domain.site port 443: Connection refused
I thought it might be the Cloudflare firewall that is blocking the connection,
and I tried creating a firewall rule in the Cloudflare panel that allows my IP address.
it didn't work.
I contacted my hosting and they said their firewall is not block ...
Since Sep 30 14:01:15 2021 GMT any software using openssl <=1.0 (like curl, php etc.) can't connect to hosts with Let’s Encrypt certificates
* SSL certificate problem: certificate has expired

I have IPv4 and ipv6 addresses on my network card, when I send a request with curl I want only the respective IPv4 or IPv6 to be used and no fallback e.g. When IPv6 to IPv4 takes place.
curl --interface XXXX: c020: XXXX: e601: XXXX: 596c: XXXX: db97 http://ip4only.me/api/
curl: (45) bind failed with error 22: Invalid argument
curl -x http: // [2603: XXXX: 8003: e601: XXXX: 596c: XXXX: db97]: 8080 ...
The first 3 variables will always have no spaces. The fourth "slacksitename
" has spaces
ip=“x.x.x.x"
record_name=“demo.xyz"
slackuri:”WEBHOOK"
slacksitename:”123 Main St"
When called with cURL
curl -X POST -H 'Content-type: application/json' --data '{"text":"’$slacksitename': '$ip' '$record_name' DDNS updated.”}’ $slackuri
The output is as follows:
curl -X POST -H 'Content-type: applicat ...
I have compiled PHP after compiling Curl 7.73 .
Curl -v shows me it's 7.73, and if I go to my web server and check phpinfo() output it's also 7.73 .
However, the compiled php cli is showing me that it's running Curl 7.68 !
To confirm this, I checked the output of php --ini and also ran a script from cli to get the output of curl_version() .
In order to try to force php cli curl version to be 7.73 I recomp ...

Weird issue I'm facing currently! There is nothing running on port 80.
Still curl gives 404 page not found. I can telnet to port 80 and even start a container exposing port 80 (host). But no requests reaches the container!
Any idea what might be going on? How do I debug this?
$ netstat -tulpn | grep :80
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN -
...
I'm trying to deploy war file using Tomcat manager remote deploy script but I get the error 'Can't open 'target/**war' file. I'm following a tutorial and it works for the author.
https://community.spiceworks.com/topic/479900-how-do-i-use-wildcards-for-curl-upload article says
The curl command line utility is mainly intended for one-shot file transfers, it doesn't support wildcards per se.
So ho ...
A server I need to communicate with only allows TLS1.3 traffic.
I have thus updated the version of OpenSSL bundled with Amazon Linux 2 to OpenSSL 1.1.1c
.
Following this guide
I am now able to use TLS 1.3 using OpenSSL e.g. openssl s_client -connect google.com:443 -tls1_3
.
I need other command line tools such as cURL and Git to use this updated version of OpenSSL so they can communicate to the server ...
My system is Win10 with WSL2, I ran a gogs
docker container (from ubuntu in WSL):
83b2a8833235 gogs/gogs "/app/gogs/docker/st…" 17 minutes ago Up 17 minutes 0.0.0.0:10022->22/tcp, :::10022->22/tcp, 0.0.0.0:10080->3000/tcp, :::10080->3000/tcp gogs
I found that I can cURL it, but cannot use browser to visit it:
>curl -vvv http://localhost:10 ...
I am trying to automate captive portal detection on an IoT device. My basic understanding of a typical captive portal is that it checks a device's MAC address on connection, and if the device's user hasn't already agreed to the network owner's T&Cs then it will redirect all outgoing traffic to its splash page. This is easy to check for with curl, because if we try to access a known URL and get a 3XX ...
I have a reverseproxy that proxies HTTP/HTTPS traffic between webbservers and I have set up Suricata in order to find and block malicious traffic to it.
Is there any way to trigger a alert via a CURL-request? Does the EICAR-test work?
I have done some googling but I could not find something straight-forward in order to trigger Suricata with curl.
I need to download data from a server in batch operations. The server shows the following behaviour with approximately 30 % of the downloads:
- DNS works, host gets resolved.
- Connection gets established.
- Download does not even begin (no data is sent).
Therefore I need to retry a few times until it works. The problem is that if the download does not begin within one second, it hangs forever. Therefore ...
On a fresh ubuntu 21.04 x64 or 20.04 lts x64 I do:
apt install build-essential
wget https://curl.se/download/curl-7.77.0.tar.gz
tar -xvzf curl-7.77.0.tar.gz
cd curl-7.77.0/
apt install libnss3-dev
./configure --with-nss
make
That's what I get:
Making all in lib
make[1]: Entering directory '/root/curl-7.77.0/lib'
make all-am
make[2]: Entering directory '/root/curl-7.77.0/lib'
CC libcurl_ ...

I'm trying to install curl 7.77 (libcurl) with all options (I also wan to try http3)...
I downloaded from https://curl.se/download.html and decompresse it, I ./configure like this
./configure --with-ssl --with-bearssl --with-gnutls --with-mesalink --with-nss --with-openssl --with-polarssl --with-wolfssl --with-mbedtls --with-winssl --with-darwinssl --with-libssh2 --with-libssh --with-quiche --with ...