Click here to Skip to main content
15,891,184 members
Everything / cURL

Curl

cURL

Great Reads

by Michael Haephrati
Minds.com is a blockchain-based social network where users can earn money or cryptocurrency for using it.
by Daniel 11317535
Steps to automate application exports for case360 using cURL
by Michael Haephrati
How to use an OCR SDK using C++ and libCurl
by Michael Haephrati
Possible ways to use a Proxy Server within a Windows C++ application

Latest Articles

by Michael Haephrati
Minds.com is a blockchain-based social network where users can earn money or cryptocurrency for using it.
by Michael Haephrati
Possible ways to use a Proxy Server within a Windows C++ application
by Michael Haephrati
How to use an OCR SDK using C++ and libCurl
by Daniel 11317535
Steps to automate application exports for case360 using cURL

All Articles

Sort by Title

cURL 

15 Mar 2016 by Member 10305620
I am trying to compile Libcurl for my project but I am getting below error.g++ -g -o Main.exe Main.o L"C:\Test\src\WebSocket\lib" -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 -DCURL_STATICLIB -llibcurl /mingw32/bin/ld.exe: cannot find -llibcurlWhen I built libcurl usinf mingw32 I got...
15 Mar 2016 by Richard MacCutchan
If you look closely at the Link Options - Using the GNU Compiler Collection (GCC)[^], you would see that the option should be -lcurl.
25 Oct 2013 by Member 10322654
Hi , I am trying to access "https" server using xml+soap but every time i am getting 411 error saying Length Required, data should be chunked or length required ....Please find my code below here i am providing Content-Length for specifying length and Transfer-Encoding for chunked data...
18 May 2019 by Gerry Schmitz
Quote: The url belongs to a camera You need to read the instructions that came with the "camera". Like, what "message" to send to get what you want.
1 Nov 2021 by wifinut
I'm trying to pass a defined variable in a BASH CURL command. I can't seem to get the single quotes or double quotes correct and it results in an error: line 22: --user: command not found Hardcoding the value is no problem. What I have...
1 Nov 2021 by Richard MacCutchan
It is because of the uncontinued blank line and the single quotes around $password. The following works*: curl "https://somewebsite.com" \ --request POST \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data...
9 Aug 2021 by wifinut
I'm trying to use Linux CURL command in my shell script where I make a conversion from Bps to Mbps to get the internet speed. However, the speed is not accurate. For example, my 100MB internet connection shows initially ~83Mbps. If I run the...
25 Jan 2022 by Member 15513062
I tried to increase the no. of records per run and computed for records/sec == throughput, ofcourse given the time_total. And expect curl to increase throughput per run, which explains the increase per run, in this case. When i plot Bytes...
2 Apr 2021 by wifinut
I'm looking for a method to obtain my provisioned ISP bandwidth via shell script. To be clear, I'm not looking to do a speed test. My goal is the following: 1. Get my provisioned bandwidth (up/down) 2. Run a test to obtain the percentage of...
2 Apr 2021 by Dave Kreskowiak
The only way to get your bandwidth is a speed test. There is no information stored on your machine or any standard method on the internet to get your provisioned bandwidth.
18 Apr 2015 by Jems_007
Callback URL :curl https://na1.Host.com/services/data/v20.0/sobjects/Account/ -H "Authorization: Bearer token -H "Content-Type: application/json" -d "@newaccount.json" -X PATCH Example request body newaccount.json file{"Name" : "Express Logistics and Transport"}I want to call web...
3 Mar 2024 by GiulioRig
Hi , i try to modify this example api-usage-examples/V5_demo/api_demo/Encryption_HMAC.sh at master · bybit-exchange/api-usage-examples · GitHub[^] wiht this code _ByBit_PlaceOrder1() { # Read Bybit API keys and set them as global variables...
8 Mar 2024 by Member 16218405
Hi, So far I can only spot that you are using $URLPART2 in the definition of ORIGINAL_STRING before it is filled in with values (so URLPART2 is empty at this time). If is shall be empty, omit it, if it shall be populated, use it once it is...
22 Feb 2017 by TimGallin
os:win7-32 vc10first I use "perl configure no-shared VC-WIN32",then nmake,nmake test and nmake install.It works well,I got the directory openssl in "c:\\program files" and ssl in "c:\\program files\common files".I used the openssl to build static curl 7.52.1,my curl build command is nmake /f...
17 Aug 2020 by Bullgill Coder
Hi, I've written an API in c# that updates a SQL table. The API passes JSON to the code. If I run the API through Postman the code works correctly and updated the SQL table, but if I run through a CURL command I get the "Object reference not set...
13 Aug 2020 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a...
13 Aug 2020 by Dave Kreskowiak
Well, the first thing I see with your controller is that it assumes the "value" passed into the method is not null and contains valid data. You do no validation of the "value" at all. ...and this leads to the error you're getting. In Postman,...
17 Aug 2020 by Bullgill Coder
I've managed to get things working by changing my code to a HttpRequestMessage [HttpPut] public void Confirmation(HttpRequestMessage request) { var content = request.Content; _conPU = new...
5 Feb 2024 by GiulioRig
Hi i try to call a api of cctx with curl i formatted a code in this mode curl -X GET "http://localhost:3000/exchange/binance/orderBook?symbol=BTCUSDT&limit=1&id=MYAPI&apiKey=1230000&secret=SECRETECODE000092934845F" -H "accept:...
4 Dec 2022 by armanvaneld
Hi is possible without creation bot only with curl scrape people in public group? thanks What I have tried: Hi is possible without creation bot only with curl scrape people in public group? thanks
7 Sep 2017 by Karim Pazoki
I'm a beginner in Codeigniter.I use CI 3.0 (last version).I wanna use recaptch in my code.When I search in google for curl class in codeigniter I find this code$this->load->library('curl');but when I use this in my codeUnable to load the requested class: Curland reality there isn't...
7 Jun 2015 by Richard MacCutchan
You first need to install the library on your system; see http://curl.haxx.se/[^].
8 Feb 2017 by Surjeet Nandi
GitHub - philsturgeon/codeigniter-curl: THIS IS NO LONGER MAINTAINED, USE http://docs.guzzlephp.org INSTEAD[^]add this lib. in CI
7 Sep 2017 by Member 13398523
PHP CURL to CodeIgniter controller - Stack Overflow[^]
16 Jun 2016 by AdamDedanga
So, I'm trying to fetch API-data using cURL, but I get the message "fail" from the else-statement in the code below. The API call is Google geocode for fetching coordinates.The code:
29 Nov 2016 by Jan Aranas
Hi i have this series of code i can grab data from voluum server but the problem is i cant alter anything when using PUT i dont know if i have the right syntax for server request to altertoken; $id = 'asdafewfcs'; $karon = date("Y-m-d"); $datetime = new...
10 Jun 2020 by Member 9179307
Hi, I'm experimenting with cURL and get the following error when I start the debugger: Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args C:/RASPBI~1/bin/Debug/RASPBI~1.EXE done Setting breakpoints...
10 Jun 2020 by Richard MacCutchan
See Non-debug DLL Symbols - Debugging with GDB[^].
26 Feb 2021 by Michael Haephrati
Minds.com is a blockchain-based social network where users can earn money or cryptocurrency for using it.
19 Apr 2015 by Spatika007
Could anyone tell me how to download a pdf file in server through ftp curl to a designated file on my Linux PC using username and password.I tried following code but it doesn't download and ends up time out case.curl -o username:password 'ftp://website.com/sample.pdf'
14 Sep 2021 by Richard MacCutchan
The same reason as in your previous post of this question at Not able set the cookies getting the undefined index error.[^]. Please follow the link I gave you and study why the setcookie method does not immediately set the value in the $_COOKIE...
14 Sep 2021 by OriginalGriff
Repost: Deleted. Please do not repost your question; use the Improve question widget to add information or reformat it, but posting it repeatedly just duplicates work, wastes time, and annoys people. I'll delete this one.
15 Nov 2022 by OriginalGriff
There is nowhere near enough information here for us to begin to help you - we have no idea what you are trying to do, or where you are starting from. We have no idea what you code looks like, or what might be happening when you try to run it....
27 Jan 2021 by rtksmithjoton123
I pass the formdata with curl -X POST "https://localhost:44333/action" -F "data={\"propery1\":\"value\"}" I set the property is required, but it always prompts The NewPassword field is required . What I have tried: I have try to use also...
27 Jan 2021 by RickZeeland
curl -X POST -F 'username=xxx' -F 'password=something' -F "data={\"propery1\":\"value\"}" https://localhost:44333/action
12 May 2018 by caspianweb online
I can't save the output data of this class using php in databases
11 Apr 2019 by Member 3722539
I am required to change ip adress everytime this function gets executed I am trying this code below .But I am completly confused.How can I do this What I have tried: function getData($domainName, $ext) { $proxy = array( 1 => array( '88.255.101.247', '8080' ...
11 Apr 2019 by phil.o
You function getData does not return anything, instead it does a print_r() call. You may try return $result; instead.
4 Dec 2014 by tanya de la merced
Hi guys, I'm actually developing a project which I will get all the data from a particular website and export it to excel. Does anyone created a php project similar to mine? Please do help me on how to develop it. On the project that i am currently doing, the details can be viewed(details from...
29 Mar 2016 by Member 11179782
the last bit of my php code looks like this: $curl = curl_init("../s/r.asp"); // the URL that processes your POSTcurl_setopt($curl, CURLOPT_POST, true); // use POST methodcurl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json")); // set POST...
19 Jun 2016 by Member 3018373
I'm writing a very simple program in MS Visual Studio Community 2015 that uses cURL. cURL installs header files here:C:\Program Files (x86)\CURL\include\curlA little embarrassing, but I cannot figure out why MS Visual Studio cannot find include file curl.h which is in that...
19 Jun 2016 by KarstenK
You are on the right track, but it looks like you use the wrong library.Take a look at the discussion at stackoverflow because they use antoher and additional libraries and on the original sample code from curl.
19 Jun 2016 by Jochen Arndt
For a single application (the only application using these dependencies) add the properties to your project:C++ - General - Additional Include Directories: "C:\Program Files (x86)\CURL\include"Linker - General - Additional Library Directories: "C:\Program Files (x86)\CURL\lib"Include...
3 Apr 2023 by Member 12899279
Please don't give links of curl documentation or examples as they are very old and confusing i just need a very simple example in which if i send files of type .docx or .pdf from c++ to my php script i can save them in folder on php server What...
25 Feb 2020 by Richard MacCutchan
See the comments at libcurl - curl_easy_perform()[^].
4 Feb 2018 by Member 12857222
I create web service to save data in database public string SaveData(String resultData) //save data to database { DLR service = new DLR(); Context.Response.ContentType = "application/json"; string filePath = Server.MapPath("~/Error.txt"); using (StreamWriter writer = new...
11 Nov 2018 by Member 14051386
I have a PHP script that will let you add a dynamic subdomain in cpanel from godaddy. But the problem is not adding a subdomain to the cpanel. Any advice or help will be much appreciated thank you. What I have tried: $whmusername = "sample"; $whmpassword = "@sample"; $subdomain =...
24 Nov 2014 by Member 10896619
Hello, Friends I am using following code to send a mail but here the body of mail is statically defined but i want to send some variable values like UserNamemail and Passwordmail. Here if i declare UserNamemail="sljfgsg",Passwordmail="lksdhfi" then my mail going successfully but my value for...
23 Nov 2014 by Richard MacCutchan
You add variables exactly the same as you add static values, by writing the variable names in the code.
28 Sep 2017 by TimGallin
I know there is a vs project directory in curl's src.I can use that to build libcurl in vc12_xp and it works fine.But I still need build openssl in vc12_xp and it doesn't have a vs project file. What I have tried: I've tried to set vs environment variables following this official...
28 Sep 2017 by TimGallin
Seems I have found a solution.I print these variables out and I found the Microsoft Official solution is not suitable for me.On my computer the matched directory's name is v7.1A,not 7.1A. And after I finished set vsvars32.bat I found there is no variable named "CL",so I just set CL equal to...
15 Apr 2015 by Hetal Jariwala
Can any one tell me how to call following curl request from c#?curl -X POST https://api.abcd.com/v1/transferAmount \ -H "Content-Type:application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d ' { "paymentMethod": { ...
22 Feb 2015 by Member 11380284
I have this curl request which I've been able to cobble together from various tutorials, and it works, but I need to be able to do it in C#.curl -K myconfig.cfg http://myserver/servlet which reads config file from stdinwhere myconfig.cfg is a configuration file with some name/value...
22 Feb 2015 by Zoltán Zörgő
Curl is not a command, it is an executable. But also a library! You better look for a wrapper around that library. Like this one: https://github.com/masroore/CurlSharp[^], bout you might find more out there.
13 Sep 2022 by ibenyaho
I would like to convert php curl code below to asp.net.
2 Nov 2015 by Member 10308543
Hey guys,I am working on an Illustrator extension project which uses HTML5 for UI and JavaScript for implementing functionalities.Apart from HTML5 I am also using JQuery and AngularJS.Illustrator SDK has an special feature where you can execute a process using it.I need to pack a PDF...
25 Oct 2022 by İsmet Özdeş
Hello How To Generate HTML Table from Curl Response ? my code ...
27 Mar 2020 by Member 10042484
Hi All, I want to connect to google drive to display/download/upload files using username and password through c++ project. I was trying to use curl library to achieve this, but i was not successful in doing this. Could anyone help/guide me in achieving this? The main issue is to login to user...
27 Mar 2020 by Michael Haephrati
You should check 2 plages: 1. Google Drive API[^] 2. Libcurl API[^] You can also learn the basics of communicating with this (and other) API's using REST, so you can choose other wrapper libraries or write your own. Many things has changed...
6 Jan 2018 by Member 12825432
I i am tryng to make a website that get the car parts of a selected vehicle model, i get the values like the engine, air filter, oil filter and i want to make a table like the one that is on the website that containt this informations. This code works but i dont know how to format a table...
23 Oct 2021 by User 15365431
Hi, I'm trying to setup crypto payments using coinbase commerce but I'm having a hard time returning the hosted URL, The charge.php file seems correct but the button on my checkout.html page is not fetching the information from charge.php. The...
23 Oct 2021 by Member 15405013
Did you tried debug (breakpoint | var_dump), response from charge.php? What did you get as response from curl, try to fetch html status code, erros, to get as more information. Log - var_dump, print_r the response from coinbase, log all step...
2 Nov 2021 by User 15365431
Hi, I am using async/await to fetch a file (createCharge.php) that contains arrays with data inside. Here is my html page that has the that fetches the createCharge.php file arrays data, the createCharge.php also creates a 'hosted_url'...
2 Nov 2021 by Richard Deeming
Your PHP script is returning the URL as text. Your newurl variable will be a string containing the URL. It doesn't have a property called hosted_url, so newurl.hosted_url will be undefined. You haven't declared a variable called hosted_url in...
19 Jun 2022 by tracam
Hi, I am using libcurl to send SMTP emails from a ubuntu server. I have been asked to change the emails to have a HTML body from a temple stored in a file. Is libcurl able to send the HTML body and if so any advice or example on how to achieve it would be appreciated....
12 May 2019 by Michael Haephrati
This example[^] might help. Curl fully support HTML in email's body.
16 Jun 2022 by Member 15136862
You must include MIME-Version as well as Content-Type, for example this will work, assuming every line ends with "\r\n". MIME-Version: 1.0 Date: Thu, 16 Jun 2022 14:12:05 +0000 To: Test From: Info ...
19 Jun 2022 by Martin Fisher2
Try this char *msg = "To: bob@example.com\r\n" "From: alice@example.com\r\n" "Content-Type: text/html; charset=us-ascii\r\n" "Mime-version: 1.0\r\n" "\r\n" "\r\n" ...
3 Mar 2022 by CPallini
What about 'The Documentation' (libcurl - API[^]) ?
3 Mar 2022 by Richard MacCutchan
Quote: I'm not much familiar with the cURL. Then you will need to learn how to use it: see curl[^], or find an alternative solution.
6 Apr 2017 by Member 13109677
I have purchased an API. I don't know how to work with it exactly. I know a bit about how CURL requests are made. But using their documentation I am very confused how to work with it. I have a curl request in the format "curl -g -H "Accept: application/json" \ -u "partner_code-timestamp:digest"...
6 Apr 2017 by Patrice T
Quote: I have purchased an API. I don't know how to work with it exactly. Do you mean they don't help their paying customers ? there is not much possibilities: you can get help from other users preferably on a users forum. You should get help from authors, if they don't help, ask your money...
6 Apr 2017 by Jeremy Falcon
Also, in addition to their API support, read curl's man page... curl - Manual[^] curl - How To Use[^]
28 Apr 2014 by Member 10678759
Hi i want to make simple request response program in vc++. which is like on my localhost at helloworld.jsp there is output hello world when i send request to hellowworld.jsp it should give me output hello world. i try couple of things but it is also working but it gives me output of whole...
28 Apr 2014 by Ravimal Bandara
The best solution is use an HTML parser in client side so you can filter out the message. If it is complex you can simply wrap your message with a tag which is not used in HTML. Check the following example,hello wordnow you can find for the content within the ...
15 Nov 2022 by Aman Gupta Aug2022
It is working fine in localhost but when i updating it on live site it giving following error- {"data":[{"code":"INVALID_DATA","details":{"maximum_length":20,"api_name":"Subscribed_Newsletter"},"message":"invalid data","status":"error"}]} You...
17 Jul 2019 by Joan M
Hi all, I'm trying to control a tp-link electrical socket from the command line... By now I've done interesting progresses, being able to get the plug id... Now I'd like to go a step further and activate or deactivate it. In order to do that I've followed an Internet page that explains how...
17 Jul 2019 by Joan M
curl -X POST -H "Content-Type: application/json" -d "{ \"method\" : \"passthrough\", \"params\" : { \"deviceId\" : \"80067AC4FDBD41C54C55896BFA28EAD38A87A5A4\", \"requestData\" : '{ \"system\" : { \"set_relay_state\" : { \"state\" : 1 }}}'}}"...
17 Feb 2017 by Dinesh92
Hi,Good morning all.I have a mobile web application in php. There is a field for mobile number to be entered and after clicking OK, an OTP is sent to that number to get further access to application.Current scenario is user have to see the sms and get the otp from sms and enter it...
21 Mar 2019 by PIEBALDconsult
At work, I'm trying to access Splunk via the REST API using C#, but all the examples in the documentation use CURL and never show the resultant URL and body data. I can't install CURL at work, but I just downloaded it on my home PC. I would want to try using CURL on my home PC to see what it...
17 Aug 2020 by Bullgill Coder
I am receiving from another website a curl request with json. An example request would be curl -X PUT -H "Content-Type: application/json" -d '{"c_id":"487672","amount":10}' http://xxxx/api/b2 This is just some test code to try and see the...
17 Aug 2020 by OriginalGriff
You have to escape double quotes within a JSON string: {\"c_id\":\"487672\",\"amount\":10} But ... to get it through the CMD processor as well, you may have to additionally escape the escape character:...
17 Aug 2020 by Bullgill Coder
It's not pretty, but I've added the following line in to put the quotes back in... jsonContent = jsonContent.Replace("'{", "{'").Replace(":", "':'").Replace(",", "','").Replace("}'", "'}"); I've done this right before I deserialise and it is...
5 Apr 2017 by Testieaccou
here is a shell script which takes domain and its parameters to find status code . this runs way faster due to threading but misses lot of requests. if i ran normally it process all requests but the speed is very low. is there a way through which speed is maintained and it also not misses all...
12 Jun 2023 by Earl Livingston
Warning, Noob when it comes to scripts, but I have a problem with the script below-using cURL. curl -L "%host%/cm?cmnd=Power%con%%%20On" The Above code does not execute. %host% does not work but if I enter the IP address or %host1,2,3,..% it...
12 Jun 2023 by Richard MacCutchan
I have made a couiple of minor modifications to your command (not curl) script as follows: @echo off if NOT "%1" == "" GOTO continue ECHO Required parameter missing GOTO :EOF :continue SETLOCAL set host1=http://192.168.0.254 set...
14 Sep 2021 by Priyanshu Sharma 2021
$cart_id = null; $cart_version = 1; if(isset($_COOKIE["cartid"])){ $cart_id = $_COOKIE["cartid"]; $cart_version = $_COOKIE["cart_version"]; } else { $curl = curl_init(); ...
14 Sep 2021 by Richard MacCutchan
You cannot refer to cookies immediately after setting them like that; see PHP: setcookie - Manual[^].
18 Nov 2014 by Member 11243247
I need to transfer a certain file to a SFTP along with private key and passcode for private key. I am using following curl command format but I am getting curl error code 7:couldn't connect to host. Please have a look at below curl command and suggest what am I doing wrong here. Thanks a...
20 Feb 2020 by Member 12899279
i am using curl and its getting test data fine but i am unable to send the data from it to my php script c++ code i am using is taken from curl post examples which is: CURL * curl; curl_global_init(CURL_GLOBAL_ALL); CURLcode res; string data1...
20 Feb 2020 by CPallini
I would test the C++ code using a free HTTP server available online. Communication testing is a better experience when one of the endpoints is rock solid.
20 Feb 2020 by Member 12899279
got it working with these changes Php changes:- $data1=mysqli_escape_string($conn,$_POST['data1']); $name=mysqli_escape_string($conn,$_POST['name']); $project=mysqli_escape_string($conn,$_POST['project']); C++ code changes:- string data1...
30 Jan 2021 by Michael Haephrati
How to use an OCR SDK using C++ and libCurl
18 Sep 2016 by Member 12746329
I currently having a problem with a script which I bought from the underground recently. I hope my question here can be answered and catch a person's interest. I'm into this kind of stuffs as this gives me curiousity and fun. Please bare with me :)Now let me continue, The code which I bought...
18 Sep 2016 by David_Wimbley
So you're a script kiddie who wants help with the hax0rz? My suggestion, learn how to program, then learn PHP, curl, and how to use curl within PHP. PHP Tutorials[^]Use curl in php[^]If you have a legitimate issue that isn't finding assistance trying to access secure servers/services...
17 Jun 2014 by DrGrim
Hello ! I have this piece of code : require_once("Xpath.php"); //ini_set('xdebug.max_nesting_level', 200); scrape("http://filmehd.net/page/1"); set_time_limit(0); function scrape ($url) { $xpath = new XPATH($url); $get_image_src =...
22 Jul 2013 by kvamshik89
Hi, How can I check, server availability at a particular IP address.When am directly using cURL to pass arguments to server, and do some operation, its taking really long time to through error if server is not available.Some solution please..Thanks and regardsVamshi
22 Jul 2013 by max_nowak
I would have tried this:int result = system("ping /*host ip*/");if(result == 0){ /* host responding */ /* launch cURL call */}You will need stdlib.h for this I believe.Edit:Just found out that we already have a cool wrapper component on this forum for ping...
23 Nov 2017 by Member 13538121
The web address. tracker.ets2map.com/v2/fullmap Contains the data the data which I want to get. I then wish to format this data into the form in the document shown below. [snowball-gaming.com/2json.php] How could i go about doing this? I have tried several methods to retrieve the data, but...
2 Nov 2020 by Komang Putra
I need help to fix this problem.. i already sending data with curl, but it doesnt appears in database here is my code ... curl.php