Click here to Skip to main content
15,908,173 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 

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...
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...
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...
13 Feb 2024 by Richard Deeming
Applications which are not running "elevated" do not have write access to the Program Files / Program Files (x86) folders by default. This has been the case for many years. You need to choose a better location to store the files you want your...
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:...
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...
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...
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...
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
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....
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...
25 Oct 2022 by İsmet Özdeş
Hello How To Generate HTML Table from Curl Response ? my code ...
13 Sep 2022 by ibenyaho
I would like to convert php curl code below to asp.net.
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....
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" ...
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 ...
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.
3 Mar 2022 by CPallini
What about 'The Documentation' (libcurl - API[^]) ?
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 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...
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...
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...
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.
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 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[^].
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...
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.
26 Feb 2021 by Michael Haephrati
Minds.com is a blockchain-based social network where users can earn money or cryptocurrency for using it.
31 Jan 2021 by Michael Haephrati
Possible ways to use a Proxy Server within a Windows C++ application
30 Jan 2021 by Michael Haephrati
How to use an OCR SDK using C++ and libCurl
27 Jan 2021 by RickZeeland
curl -X POST -F 'username=xxx' -F 'password=something' -F "data={\"propery1\":\"value\"}" https://localhost:44333/action
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...
2 Nov 2020 by Richard MacCutchan
Your syntax is incorrect for the declaration of $post. The correct way to specify arrays is detailed at PHP: Arrays - Manual[^]. Also take careful note of Richard Deeming's comment.
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
2 Nov 2020 by Richard Deeming
Your array creation syntax looks nothing like the documentation: PHP: Arrays - Manual[^] The closest seems to be the new syntax from 5.4.0: PHP: New features - Manual[^] That would still need to be: $post = [ "no_pengajuan_full_day" =>...
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'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...
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 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:...
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,...
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...
10 Jun 2020 by Richard MacCutchan
See Non-debug DLL Symbols - Debugging with GDB[^].
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...
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...
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...
25 Feb 2020 by Richard MacCutchan
See the comments at libcurl - curl_easy_perform()[^].
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...
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.
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 }}}'}}"...
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.
12 May 2019 by Michael Haephrati
This example[^] might help. Curl fully support HTML in email's body.
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.
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...
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 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...
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...
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 =...
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 ...
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...
12 May 2018 by caspianweb online
I can't save the output data of this class using php in databases
21 Feb 2018 by Richard MacCutchan
Your declaration of -DCURL_STATICLIB means you will use the static library, but you then try to link to the dll. If you use that declaration then you need to specify -lcurl not -lcurldll.
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...
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...
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 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...
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,...
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...
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...
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 Sep 2017 by Member 13398523
PHP CURL to CodeIgniter controller - Stack Overflow[^]
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...
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 Jeremy Falcon
Also, in addition to their API support, read curl's man page... curl - Manual[^] curl - How To Use[^]
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...
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...
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 :...
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 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...
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
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...
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...
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) ...
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 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...
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...
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 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...
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.
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 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...
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...