Questions tagged as 'curl'

2
answers

Check 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, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT...
asked by 21.08.2017 / 19:32
1
answer

Block login through CURL PHP

I have a login form that sends data via post and would like to block the login via curl. Is this possible?     
asked by 23.07.2014 / 18:32
2
answers

CNPJ query using PHP

The situation is as follows, I have a script in PHP that does CNPJ queries through the IRS website, however it is returning some errors, I really do not know if they are errors . HTML / PHP code consulta.html <html>...
asked by 06.04.2016 / 13:48
2
answers

Capture div by class

I'm trying to capture a div from its class, but I did not succeed, note: I try to capture the div with the class class='m-definicao-conteudo' of the site that I report to curl, but I get this error:    Warning:   DOMDocument :: loadHT...
asked by 21.12.2014 / 05:03
2
answers

Curl, SSL and Security

Hello I have a small question about CURL and SSL. I have seen that it is unsafe to put false in CURLOPT_SSL_VERIFYPEER, as it would cause CURL not to check SSL, allowing data interception. But I did not understand how this could happen....
asked by 01.04.2016 / 21:30
1
answer

Twitter API with CURL

OBS: THE COMPLETE CODE IS HERE , but I made this adjustment to receive cookies I'm trying to read the cookie files to make the requisite requests to get the result I expect, see my code: $tokens = ['_twitter_sess', 'ct0', 'auth_to...
asked by 06.09.2017 / 12:24
1
answer

Curl Equivalent in python

I was learning to use site APIs for a project, and at the beginning I was struggling and needed to ask. This was the example of using the API to test credentials on the site, I believe it's C ++: curl -u user:password https://myanimelist.ne...
asked by 15.02.2018 / 02:23
2
answers

Get json values in cURL return

I have three distinct servers: server A, server B, and server C. Where A registers users and stores personal information. I'm trying to log in from servers B and C into A using cURL. I need to return the values of A to authenticate user and t...
asked by 24.05.2015 / 15:34
1
answer

Receiving data in JSON with cURL

I'm sending a cURL, to a URL that will return a JSON response. I'm not sure how to do this, but I'm not sure how to do this, but I'm not sure how to do this. return page is blank. How do I get the page returned in JSON? I tried something like...
asked by 02.04.2015 / 16:07
1
answer

Problems with cURL using Face ++

I'm using a Face ++ API for face recognition. I put a code in PHP that sends a face.jpg to their API according to the rules in the documentation, but this cURL either is not sending the data or it is not working, because in Linux in...
asked by 09.08.2018 / 17:02