Most voted "curl" questions
Curl is a command line tool for transferring data with URL syntax, supports DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. Curl supports SSL certificates, HTTP POST, HTTP PUT, FTP upload, HTTP based upload form, proxies, cookies, user authentication + password (basic, Digest, NTLM, Negotiate Kerberos ...)
Learn more…317 questions
Sort by count of
-
2
votes2
answers306
viewsHow do you send three Curl requests at once?
Good guys I’m creating a system, but I’m having a doubt I wanted to send the request all at once by curl_init, like I want to send to search in 3 servers at once
-
2
votes1
answer2199
viewsWhat does (-X,-H,-d) mean for this command (Curl -X POST -H "Content-Type: application/json" -d) and how to do it for the php file?
curl -X POST -H "Content-Type: application/json" -d I need to do this command and send a JSON to a certain API that will return a response but I don’t know how the structure of this would look in a…
-
2
votes1
answer576
viewsreverse proxy URL
My URL requires information on a server (Youtube). But for me to have the desired answer, the request should be made with the IP of a user, instead of mine. How do I deliver the content directly to…
-
2
votes1
answer185
viewsHow to use the Nfephp API without the server having to support Curl 7.22.2
Is there any possibility of using the Nfephp API without the need for server endure cURL 7.22.2? Any settings I can perform, an alternative lib, etc?…
-
2
votes1
answer728
viewsCurl looks 100% identical to my request using common browser
I need to perform some standard functions that I always perform manually, and I would like to automate it. I tested with iframe, but without success, can not read the document nodes. So I thought…
-
2
votes1
answer179
viewsError making POST containing "@" or "#" in PHP with Curl
I’m having a problem and I can’t fix it, I have a PHP script that submits a form using Curl. Initially I used the format array(key => value) to submit the POST data. However I came up with a…
-
2
votes2
answers2095
viewsCNPJ query using PHP
The situation is the following, I have a script in PHP that makes CNPJ queries by the site of Receita Federal, but it is returning me some errors, I don’t really know if they’re mistakes. HTML/PHP…
-
2
votes2
answers244
viewsCheck is Curl image
Is there any way through the Curl request to know if it’s an image or not? $ch = curl_init($image_url); $name = generateRandomString(); $fp = fopen($caminho.'/'.$name.'.png', 'wb'); curl_setopt($ch,…
-
2
votes1
answer430
viewsGoogle Maps API (server-side) limits
I am designing a system in PHP, which will access the Google Maps Geocoding API via URL (Curl). This system will be sold to different clients. All sold systems will be on the same server. Each…
-
2
votes0
answers696
viewsKeep session active for multiple requests using CURL is too slow
I made a script to post ads automatically on a classified site for a particular user. I store the ads ID locally in the database, then with CURL, I log in, and then loop on each ad ID to activate it…
-
2
votes1
answer3009
viewsEquivalent of python Curl
I was learning to use API’s from websites to a project, and right at the beginning I had difficulties and had to ask. This was the example of the use of API to test credentials on the site, I…
-
2
votes1
answer380
viewsHow to run this Curl in PHP?
I’m trying to run this Curl in PHP and do not know how to convert it. Follow the model: Curl -u "apikey:{apikey}" -X POST…
-
2
votes1
answer164
viewsproblem with integration with affinityassistencia (Curl + php + xml)
Well, I’ve got Curl up and running. I’m trying to integrate with the site: https://www.affinityassistencia.com.br/ws/examples/? usuario=teste&password=teste&button=Log in getplano method. i…
-
2
votes2
answers160
viewsUse IP or LOCATION the user is (or closest to) to send a query
I have the following code: function getpage($url, $postdata=''){ $c = curl_init(); <br> curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_SSL_VERIFYPEER,false); curl_setopt($c,…
-
2
votes1
answer239
viewsNetscape HTTP Cookie File - Use saved file?
Guys my doubt is basic, but there is a however, I searched and did not find the explanation, on the documentation site of cURL explains but even I translating did not understand. Good let’s go.…
-
2
votes1
answer242
viewsSimulate a click, how to share a link to Google+ without clicking
My challenge is to share my site to Google+ without clicks. I have a google account [email protected], I created a profile on G+. The idea is through localhost create a script where when accessed it will…
-
2
votes0
answers449
viewsReturn content from a form via Curl
I have this code that login on Instagram, but I want to open in a modal or any other kind of thing for fomulario coming from instagram when checkpoint for required, see: <?php $username =…
-
2
votes0
answers115
viewsError retrieving Central Bank report
The functions to meet the Central Bank Expectations of the Focus Report are presented the following error: Error in curl::curl_fetch_memory(url, handle = handle) : Failure when receiving data from…
-
2
votes1
answer76
viewsProblems with Curl using Face++
I’m using a Face++ API for visual face recognition. I set up a code in PHP that sends a face.jpg to their API according to the rules in the documentation, but this Curl is either not sending the…
-
2
votes1
answer1184
viewsGet Deadline with Postal Web Service
I am trying to get the delivery time dynamically using the Webservice Post, for this I am using this documentation. If you enter the their test page, it is possible to enter the PAC service, for…
-
2
votes1
answer84
views -
2
votes1
answer87
viewsI’m trying to figure out the size of a downloadable file on an external server
I’m making public function remote_size() { $url = 'http://200.152.38.155/CNPJ/DADOS_ABERTOS_CNPJ_01.zip '; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch,…
-
2
votes3
answers41
viewsAssign new items in an array without rewriting the whole code
Is there any way to add new items without rewriting the code ? See: If there are cookies then I use CURLOPT_COOKIE If not, I don’t use: if ($cookies) { $options = [ CURLOPT_URL => $url,…
-
1
votes1
answer1916
viewsHTTPS via Curl JSON response
I am trying to bring back the following page with Curl. https://api.mercadolibre.com/sites/MLA/search/ How do I do this, being the HTTPS protocol?…
-
1
votes1
answer606
viewsSelecting data in Java Curl
I would like to know how to select data using gson library. BufferedReader reader = null; URL endereco = new…
-
1
votes1
answer1523
viewsLog into a system via Curl and display data from another page
I am trying to display the contents of a page after logging in to the system. The login is done successfully, I receive the welcome from the system, but when changing the URL and making a new…
-
1
votes1
answer449
viewsCurl login page in ASP does not authenticate
I’ve searched everywhere possible on the web, but so far I can’t understand what’s going wrong with my code. The thing is, I’m trying to access the student portal of my college, using Curl, my…
-
1
votes0
answers313
viewsCurl access https
Good afternoon, I need to access the following link https://www.reneg.bvfinanceira.com.br/assessoria/ and in it I need my php system to insert the login and password. The problem: 1- My page is in…
-
1
votes1
answer388
viewsCurl PHP login url post 302
I’m having trouble authenticating on a system and using the component live http header in Mozilla i can handle know the url of the post and with Curl can automate see return image of live http and…
-
1
votes2
answers1139
viewsPHP - How to fill a field using Curl?
What code do I use to fill in web page fields with cURL? These are the fields: Campo Nome: <li> <label for="supporter_full_name">your name*</label> <input class="textbox"…
-
1
votes1
answer2484
viewsConsume REST API in Node.js + Curl
I know there are several packages in Node to consume REST API but I need one that uses cURL. For some reason (which I haven’t discovered) I can’t authenticate with existing ones. I tried to…
-
1
votes2
answers55
viewsI cannot delete a range of words in a string
I made a function in PHP that returns the result of a POST and converts to a string using Curl. However, my code returns a lot of useless information. I wanted to manipulate the string so that I…
-
1
votes1
answer183
viewsImprimir array de Curl
I make a Curl in php in a url and it returns me: array(2) { ["tip"]=> int(1) ["msg"]=> string(3) "826" } I want to take only the number 826 and work with it in php. Can someone help me?…
-
1
votes1
answer1015
viewsSum of xml file values
I need to make a sum of values of an xml file. How little I’ve worked with Curl extracting data from another file or page, I don’t even know how to start. the file layout would be this.…
-
1
votes1
answer1076
viewshow to make queries passing 2 parameters via Curl?
I need to send via Curl a user and a password in txt same, it is only for test, for example Curl -v -H "Accept: application/json" -H "Content-type: application/json" http://127.0.0.1/Students/ I…
-
1
votes3
answers246
viewsI need to check if my JSON is empty to search for url with parameter set in Curl
function BuscaMarca(marca, modelo, anomodelo) { marca = $('#marca').val(); tipo = $('#tipo').val(); $.get("curl.php?tabela=BuscaMarca&marca=" + marca + "&tipo=" + tipo, function(data,…
-
1
votes0
answers85
viewsTheoretical doubt about captcha and Curl php
I saw code snippets where people use the curl to catch the captcha image, but it is possible to catch the string that is in the picture ? From what I understand, the complexity of catching captcha…
-
1
votes0
answers231
viewsHow do Curl stop running?
I’m using a Curl to download a file... but there is a problem that when the user gives a refresh on the page or for the upload the download continues happening in the background. How do I stop the…
-
1
votes1
answer149
viewsControl output size Curl
Hello, I have to pull data from a feed using Curl in PHP. Once extracted, I record the result in my bank. The problem is that the result of the call is giant. Is there any way to control this flow?…
-
1
votes1
answer1625
viewsRequest with Post and CURL Method
I am trying to recover the data from an API on the server using CURL, however it seems that POST data is not going <?php $postfields = array( 'login' => 'login', 'senha' => 'senha' ); //…
-
1
votes1
answer393
viewsPHP webservice connection occurring Curl ERROR: 35
Hello, I am trying to make a connection to a webservice that uses SSL security, and it is necessary to use a certificate. I was trying initially on a linux server, but now I’m using it on my windows…
-
1
votes1
answer570
viewsSend multiple images via Curl
Hello, I need to send via Curl multiple images, which will be received in an API, but in the API it receives in a specific way, in which I am not able to send by Curl. Follows form the API receives…
-
1
votes1
answer553
viewsHow to get the return of multi Curl (curl_multi_add_handle)?
I wanted to know how to get the return via multi Curl why by normal Curl just use the function curl_exec to get the result of the page but in the multi Curl I can’t get anything with the curl_exec.…
-
1
votes1
answer246
viewsCurl + HTTP Nodejs Server
Good morning! I created an HTTP server using nodejs as follows: var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({…
-
1
votes1
answer9213
views -
1
votes1
answer230
viewsCurl: (92) HTTP/2 stream 1 was not closed cleanly: REFUSED_STREAM (err 7)
I am trying to register a Gitlab Runner, but when I run the registry command specified in the API, error occurs. The command I try to run is like the one described in the API: curl --request POST…
-
1
votes1
answer402
viewsCurl with Google Maps Directions API returning null
Below is the code I’m using: $arquivo = "destino.json"; $info = file_get_contents($arquivo); $lendo = json_decode($info); foreach($lendo->rotas as $campo){ echo "<b>Origem:</b>…
-
1
votes1
answer903
viewsGet PHP DOM attribute value
I’m trying to make an application to take certain values from a page and insert them into a page of mine. I don’t know how to program, but I’m still taking a risk, because it’s to improve my…
-
1
votes1
answer901
viewsCurl PHP - Retrieving html from page
Hello, I’m training this URL. Can you tell me why the following section doesn’t work? <html> <head> <meta charset="UTF-8"> <title></title> </head> <body>…
-
1
votes0
answers54
viewsList projects created within the gitlab group by creation date
I’m starting with Gitlab and I have the following demand, we need the API to identify the projects created in the year 2020 within a particular group of gitlab projects. Listing the following…