Click here to Skip to main content
15,891,473 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 Updated

cURL 

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:
5 Dec 2013 by Aescleal
The simplest way is three calls to curl_easy_setoptCURLOPT_POST tells the library that you're going to do a post.CURLOPT_POSTFIELDS tells the library that this is a pointer to the data that you want to send in exactly the form the server expects it. It's up to you to make sure that this...
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...
13 Jun 2018 by ansh_kumar
I want to send an email with attachment from c++ using libcurl( http://curl.haxx.se/[^]).I'm able to send an email successfully from gmail server but don't know how to send with attachment.The code I'm using is as follows:#include #include #include...
21 Nov 2014 by ansh_kumar
After a very long observation and experimentation I finally found the solution.It will be too long to give details of how this code work, so I'm simply putting the working code:#include #include #include #include #define FROM ...
4 Feb 2014 by ansh_kumar
I'm successfully able to send email using libcurl from visual c++ (in debug mode), but when I use release mode I'm getting following error:> MAIL FROM: SIZE=22322250707370015
4 Feb 2014 by ansh_kumar
I've finally found a working code and found where the buffer was overflowing but I still need some explanation how it's happening.First my correction to the code:In function read_file()...buffer_size += fileSize;...buffer_size += ADD_SIZE;... strcpy(fileBuf[len++],"To: "...
23 Nov 2014 by ansh_kumar
The code bellow uses Imagemagick++http://www.imagemagick.org/Magick++/[^] to base64 encode the image.#include #include #include #include #include #define FROM ""#define TO ""#define...
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
5 Dec 2013 by AsthaS
Hi all,I want to create a post request and send it to server using libCURL can anyone help me in that.If this is my sample request/WCS_Capabilities/Capabilityhow am I suppose to set the xml...
4 Feb 2014 by bling
Check the results of fread, fseek, and ftell for errors - which can ruin your file size estimates.Also, you have a memory leak.char* temp_buf = new char[SEND_BUF_SIZE + 4]; //taking extra size of 4 bytes
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...
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 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...
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...
12 May 2018 by caspianweb online
I can't save the output data of this class using php in databases
4 Feb 2014 by CPallini
Without seeing your code we can give little help. However you should have a look to the classical Newcomer's article: "Surviving the Release Version"[^].
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.
3 Mar 2022 by CPallini
What about 'The Documentation' (libcurl - API[^]) ?
8 Feb 2016 by Daniel 11317535
Steps to automate application exports for case360 using cURL
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,...
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 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 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...
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 =...
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...
28 Oct 2017 by gavinsimpson
Just a slight change to Solution 7, to allow the sending of the email body text and an attachment. The key is in the boundry #include #include #include #include #include using namespace std; #ifdef _DEBUG #pragma comment(lib,...
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.
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:...
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...
10 Apr 2019 by Haseeb A. Basil
The reason you are getting 1 is because of the following line: echo print_r($result); You see, how you are using `echo` and `print_r`, so in this case `print_r` is returning `true` which is being typecasted into integer and is being printed as `1` by `echo`. So, just remove that and it...
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": { ...
13 Sep 2022 by ibenyaho
I would like to convert php curl code below to asp.net.
25 Oct 2022 by İsmet Özdeş
Hello How To Generate HTML Table from Curl Response ? my 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...
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...
6 Apr 2017 by Jeremy Falcon
Also, in addition to their API support, read curl's man page... curl - Manual[^] curl - How To Use[^]
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 }}}'}}"...
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...
11 Jan 2017 by Jochen Arndt
So you have adopted the example from libcurl example - smtp-mail.c[^] and modified it.One of your modifications is related to the mail content which is created by the callback function. So the problem is obviously located there. A candidate would be the lines_read variable. But you did not...
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...
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.
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
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
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" ...
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...
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...
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...
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 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...
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...
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...
12 Jan 2017 by Member 11134219
For Dynamic email sending you can use following c++ code:#include #include #include #include #include #include int flag=0; std::string TO; std::string FROM; std::string CC; std::string Date; std::string...
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...
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...
22 Feb 2015 by Member 11377605
I am banging my head against a wall trying to convert a working curl command to a c# WebRequest.I have read through quite a few postings but didn't get satisfactory answerHere is the working curl command:curl -K pathtoconfigfile http://myserver/someservlet which processing the post...
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...
18 Apr 2015 by Member 11393768
Can someone help me to understand how to do this API thing? The problem is, it doesn't display an output. Then, I have learned that the GET is not really needed(can be there or not) to be part of the code, but in this case, when I am deleting the GET I am getting an error output. This:
27 May 2015 by Member 11615836
I fixed up this code so you can send attachments of any file type. I have no problem sending a JPG thats 165kb @ 1280x1024 resolution. I compiled this in MSVS2010. This code only needs the libCurl library, it has its own Base64 encoding function, it does not require Magick++./* C++ TLS...
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...
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...
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 Jan 2017 by Member 12890589
I am new to CURL and I am trying to send a dynamic message body. But I receive only an empty subject and message body when I attempt to use CURL lib in visual c++.Please help.What I have tried: size_t Process::processmail(void *ptr, size_t size, size_t nmemb, void *userp) ...
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 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...
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...
26 Mar 2017 by Member 13086409
URL and cURL access different when accessing a web aPI. Am I missing headers or something because the cURL php only outputs "''" rather than the URL output from belowWhat I have tried:I have this URL access :...
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 Sep 2017 by Member 13397793
I have trying calling a soap of TCS through postman and it works fine there the only problem occurs when i am trying to call it through code getting this error: "Server was unable to process request. ---> Data at the root level is invalid. Line 1, position 1" What I have tried: This is my...
7 Sep 2017 by Member 13398523
PHP CURL to CodeIgniter controller - Stack Overflow[^]
21 Feb 2018 by Member 13536260
Hello, i hope I get answers here, since this problem been bugging me since yesterday. I created a small code, using curl, I downloaded the library and put it in the mingw "lib" directory (libcurl.a and libcurldll.a), then I compiled my code with this option gcc MyCode.c -DCURL_STATICLIB...
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...
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 =...
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 ...
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...
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...
14 Feb 2024 by Member 16202259
On C:/program files(x86)/Application_name folder, Application does not having full access to the created files. What I have tried: Application service can be able to create a file in the app's folder. The file created could not be modify/delete...
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...
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...
10 Apr 2019 by Member 3722539
this is the servers array that I keep top level domain names and extensions protected $servers = array( "com.tr" => "whois.nic.tr", "gen.tr" => "whois.nic.tr", "web.tr" => "whois.nic.tr", "k12.tr" => "whois.nic.tr", "org.tr" => "whois.nic.tr" ...
10 Apr 2019 by Member 3722539
I have been working for hours to get this works the problem is that when I first execute this code everything is ok but second time nothing displays. Then I realized that if I wait 20-25 seconds gets executed as expected I am using this way whois("google","web.tr") I dont get any...
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' ...
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...
12 May 2019 by Michael Haephrati
This example[^] might help. Curl fully support HTML in email's body.
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...
31 Jan 2021 by Michael Haephrati
Possible ways to use a Proxy Server within a Windows C++ application
26 Feb 2021 by Michael Haephrati
Minds.com is a blockchain-based social network where users can earn money or cryptocurrency for using it.
30 Jan 2021 by Michael Haephrati
How to use an OCR SDK using C++ and libCurl
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...
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:...
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....
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...
13 Jun 2018 by perosoft
// --------------------------------------------------------- // Send text + n files attached // // command line compile // // g++ -Wall -fexceptions -Wno-write-strings -DCURL_STATICLIB -I/usr/local/include -g -c send_email.cpp -o send_email.o // g++ -o send_email send_email.o ...
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 Feb 2014 by Philippe Mori
As mentionned in solution 2, there are some memory leaks. Any memory allocated by new or new[] should be released by delete (or delete[] respectively.And also inspired by that solution, you might have a difference between the reported file size and the actual required size like the exact...
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...
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(); ...
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 ...