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
-
11
votes4
answers2055
viewsSSL: no Alternative Certificate Subject name Matches target host name 'xxx'
Trying to run Curl in PHP gives me this error.. SSL: no Alternative Certificate Subject name Matches target host name 'xxx' I would like to better understand this, and even debug the problem.…
-
9
votes1
answer8470
viewsWhat is Curl/curl_setopt
I’m doing an integration with Mailchimp, and I came across this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $submit_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,…
-
9
votes2
answers19928
viewsDifference between file_get_contents and Curl ?
I wonder if there is any difference between using Curl and file_get_contents and which is safer ? Thank you in advance.
-
8
votes3
answers5579
viewsSimple National Optional Consultation (by CNPJ)
I’m trying to implement a query of Simples Nacional, the operation is similar to the consultation by CNPJ of the recipe. Details I’ve understood so far: After loading the page, runs a ajax (filing…
-
6
votes1
answer597
viewsHow to understand the required requests in Curl?
Yesterday I opened a question I was obliged to delete it, because I could not ask correctly. This question I will try to explain it in parts, come on. 1 - I monitored Twitter, following a person, I…
-
5
votes2
answers2780
viewsLog into the Nfe portal with Curl and PHP
I’ve done a lot of research on this and so far I haven’t been able to do anything concrete. Is this possible? I want to make a form with the key access field and captcha code to be filled in. will…
-
5
votes2
answers117
viewsInheritance or Addiction?
Well, my question is this. I’m refactoring a system where I have an integration with a REST API, there’s a class called Marketplace (That queries the API) that I currently extend from the class Curl…
-
5
votes1
answer1392
viewsCurl php is not working
I am using Curl php on the server. function getSite($url){ $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); echo curl_error($ch); $output =…
-
5
votes1
answer98
viewsQuestions to implement a web service
I have a question about the implementation of a web service, look at the logic: I have a process that searches the data of several users in a system (system A), and I want to take this data and send…
-
5
votes1
answer834
viewsProblem with Curl, catch message body even with http != 200
I have a request on my API: $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, 'link da api'); curl_setopt( $ch, CURLOPT_FAILONERROR, true ); curl_setopt( $ch, CURLOPT_TIMEOUT, 10 ); curl_setopt(…
-
5
votes1
answer229
viewsCurl cookies expires vs n/a
The doubt is as follows, in the network browser console says cookies do not expire, see the image below: But when picking up (making a request of these) these cookies with curl expire:…
-
4
votes2
answers3860
viewsGrab a value inside the HTML Curl
I’m trying to get a value that is inside the html of a page <a href="https://www.site.com/user.asp?ref=fvFCF9D8N4Ak"> I want to take only the value ref=fvFCF9D8N4Ak I am using Curl and php and…
-
4
votes3
answers5382
viewscapture information from websites
How do Buscapé and other sites manage to get the information from the sites? is through the Curl or an xml that stores websites make available?
-
4
votes2
answers14581
viewsPHP CURL issues error "Unable to get local Issuer Certificate"
I am trying to get data from an API using the CURL extension of PHP but it is not working. The same code on another server is working. Here it works: But it doesn’t work here anymore: The code is:…
-
4
votes1
answer303
viewsCurl Friendships/create, bad Authentication data
Good with the help of the Inkeliz, made in this question, i got authentication with Twitter via form. Filing cabinet login.php: <?php require_once '../modules/config.php'; require_once…
-
4
votes1
answer211
viewsuse user ip as proxy to request
I am developing a site using the guzzle and wanted to use the ip and the port that the user accesses the site as proxy at the time of the request already tried these codes and n was <?php $ip =…
-
4
votes2
answers545
viewsProblems with the result Curl and file_get_contents
I’m trying to get an image from a website to use imagecreatefrompng(), but the backlash was never what I expected... Url:…
-
4
votes1
answer2187
viewsconsultation of mobile operators
I started a query to know which mobile operator is pulling from a site. But I can only do it once. I would like help so that I could paste a list and it was sending requests and printing the…
-
4
votes0
answers446
viewsCurl - PHP; How to make a looping in code?
I need that at the end of the code it deletes the downloads that were done and download again, which is repeated every 4 min. Every 4 min it runs this script of "download, delete and download…
-
4
votes1
answer219
viewscurl_init php does not work in url friendly?
I’m doing some tests with curl_init php I happen to have the links like this: http://localhost/produto/novo Internally it accesses the new.php file, but I’m using htaccess to work with friendly Urls…
-
3
votes2
answers1836
viewsDownload file with Curl and php
I have two servers server1 and the server2, the server2 only accept request from server1 if it is another ip it returns 404, my website is on server1 and the files for download on server2, I made…
-
3
votes1
answer2135
viewsWhat is a "cacert.pem"?
In the code where an API call is executed, there is the following line: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); When executing the code the following error is returned: SSL Certificate…
-
3
votes1
answer141
views -
3
votes2
answers5350
viewsHow do I send data to a form using Curl?
I was reading about Curl, and I saw that I can use it to send data to a form (as if I was typing the data and giving Submit). How could I do this in php?
-
3
votes1
answer856
viewsPHP - CURL Session ended?
I’m trying to create a robot to automate a process, as post here: Automating process - Robot? Given the suggestions, I am following using Curl. What is happening is the following: He can login, goes…
-
3
votes2
answers144
viewsSearch in Clipping OAB
There are several programs ( for lawyers) who read the cut of the OAB, the evolution of the process, automatically, bringing to it these changes daily. The idea is to put inside a mini system of…
-
3
votes0
answers1603
viewsSecure Pag Transparent Checkout - Unauthorized
I’m having trouble finalizing the transparent checkout of the secure pag, follow the code of what I’m leaking $url = "https://ws.sandbox.pagseguro.uol.com.br/v2/transactions"; $dados =…
-
3
votes1
answer825
viewsDownload script by Curl method
I’m having some problems with the process of script down below. Literally it is making the download very slow, and this when the download process does not occur to fall or restart from scratch. Is…
-
3
votes2
answers3638
viewsHow to turn this Curl / PUT command into php?
How do I transpose this Curl code to send it in a PHP file? curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d { "status":"paused" }…
-
3
votes2
answers9138
viewsHow to make a request with Curl
Hello, folks, I am involved in a project and need to make a request with Curl to get data from an api. But I’ve never used Curl in php that way. Can help me? curl -X GET…
-
3
votes1
answer874
viewsHow to use Curl with C#, windows Forms application
I’m trying to integrate my desktop application with an online tool (Scrumwise), but they use Curl, I’m not able to consume the Rest. curl https://api.scrumwise.com/service/api/v1/getData -k -u…
-
3
votes1
answer2509
viewsCurl Post Office Tracking
I’m trying to make a POST with Curl to check my deliveries. But it’s not returning anything. Someone can help me? <?php $post = array('Objetos' => 'PN752805878BR'); // iniciar CURL $ch =…
-
3
votes0
answers418
viewsWhy is PHP’s CURL so slow? compared to wget/Browse?
I’ve been working with the CURL of PHP 5.6, it is extremely slow with respect to other resources like wget/browse/file_get_contents. In a REQUEST POST simple, it has delay of 4-10 seconds compared…
-
3
votes1
answer1661
viewsHow do I make an http request with php with authentication and waiting for a file to respond?
I am using a Text to Speech service and would like to use it in a php that I’m riding. The problem is that I never did what the api asks and I don’t even know where to start. this type of…
-
3
votes2
answers234
viewsIs it possible for a domain to block a query via Curl?
Perform requests via cUrl, where the domain does not have a return via JSON/XML/related, the domain consulted can "block" my IP to query via Curl, or something like? Currently, the consultation is…
-
3
votes1
answer99
viewsIs using Stratum protocol in PHP possible? Is there any equivalent to Go’s net.Dial`?
I wanted to use Electrum’s servers, listed here, it uses a protocol called "Stratum", which is documented here, but I don’t even know is the most updated. I can "make it work" using the library tls…
-
3
votes1
answer463
viewsTake part of a Curl URL
Dear, was looking at this topic Take a value within html and understood that using this resource "parse_url($href, PHP_URL_QUERY)" it has the function of storing the query string in a variable. My…
-
3
votes1
answer259
viewsOpening merge request in Gitlab via Curl
Where I work, we use a variation of Gitflow in which, when a hotfix enters the product code, there is only the merge to the master which, when approved, we propagate to the develop through the…
-
2
votes3
answers348
viewsLogin to Paypal
I’m trying to log into Paypal and get the amount of the account balance but without success. My code: <?php include ("curl.php"); $fp=fopen("fpaypal","w"); fwrite($fp, ""); fclose($fp); $curl =…
-
2
votes1
answer581
viewsBlock login via CURL PHP
I have a login form that sends data via post and would like to block the login via Curl. That’s possible?
-
2
votes1
answer1370
viewsProblem with accentuation Curl
I have a code that sends data via cURL to another page inside the server, only I have a problem... When sending this data to the other page, it inserts it into Mysql only when seeing the record…
-
2
votes1
answer200
viewsCurl, how to change the country of origin
I used Curl to automatically log into Facebook, but a few minutes later, I received a message saying that someone had accessed my United States, and for security reasons they asked if I did it.. So…
-
2
votes2
answers749
viewsCapture div by class
I am trying to capture a div from its class but did not succeed, notice: I try to capture the div with the class class='m-definicao-conteudo' of the site that I inform to Curl, but returns me this…
-
2
votes1
answer539
viewsHow to upload using php without forms
I need to upload a file from the local server to another server. In this environment I compact the file on the local server and send the compressed file to the remote server. The remote server will…
-
2
votes1
answer997
viewsHow to save Cookies from a remote site with Curl?
I’m having trouble saving and reading cookies from a remote site I’m opening with Curl: $cr = curl_init($this->_URL); curl_setopt($cr, CURLOPT_RETURNTRANSFER, true); curl_setopt($cr,…
-
2
votes1
answer5879
viewsReceive JSON data with Curl
I’m sending a Curl to a URL that will return a JSON as a response. By the browser, accompanying with firebug, the return is in JSON, but when I do the same procedure by PHP, it returns a page (which…
-
2
votes2
answers3587
viewsCatch json values in Curl return
I have three different servers: server A, server B and server C. Where A registers users and stores personal information. I am trying to log in from B and C servers in A using Curl. I need to return…
-
2
votes1
answer160
viewsExtract HTML value
I get the html and a part of it from where I need to extract the data and this one <td class="address-list-item"> NOme silva <div class="modal-content" style="display:none;"> <div…
-
2
votes0
answers704
viewsHow to obtain data from the IRS?
On the website cadastral situation it is possible to consult CPF/CNPJ without going through captcha, also does not ask for date of birth. As this is possible?…
-
2
votes2
answers1196
viewsCurl, SSL and Security
Hello I have a little doubt about CURL and SSL. I have seen that it is unsafe to put false in CURLOPT_SSL_VERIFYPEER, because it would make CURL not check SSL, enabling data interception. But I…