Questions tagged as 'curl'

1
answer

HTTP / 1.1 302 Found Is it normal or does it have a problem?

I'm trying the following return in my code PHP , which also helped me a lot: #,
asked by 02.07.2017 / 00:39
1
answer

Sending file via CURL using PHP

How to translate to PHP the following CURL command? curl -F file=@/home/user/picture.jpg https://api.dominio.com/pictures I tried in some ways but the ones I found were all sending with some key (eg myfile = > /home/user/picture.jpg) bu...
asked by 03.02.2017 / 18:26
2
answers

Download multiple pages with curl at the same address without overwriting

I need to download this page multiple times, it returns a different result each time it is accessed: i="0" while [ $i -lt 10 ]; do curl -O http://httpbin.org/bytes/128 i=$[$i+1] done But every time the curl command is executed, the...
asked by 28.10.2016 / 23:30
1
answer

PHP Curl Image Upload

I'm trying to upload using cURL in PHP on an external page. At first the command line of the external page that captures the photos is exactly this: <!-- BEGIN FIELD IMAGES --> <div class="form-col col-1"> <label cla...
asked by 29.10.2015 / 13:01
1
answer

Does the cURL request in php resolve a subdomain locally?

I have a Ubuntu 14.04 Trusty VPS server and I wonder if using the cURL library resolves DNS locally to a subdomain. I have 2 domains on the same server and 1 is a subdomain (Webservice). Making a call from cURL to the webservice will the s...
asked by 03.06.2015 / 23:32
1
answer

What CURLOPT_DNS_CACHE_TIMEOUT does

I wonder what this does: curl_setopt($ch,CURLOPT_DNS_CACHE_TIMEOUT,120); The default is 120 in lib cURL . The following explanation, I found a little vague for me:    The number of seconds to keep DNS entries in memory. T...
asked by 10.03.2015 / 01:21
1
answer

Records are duplicating when entering in the database

I am making an API and am experiencing a problem. When executing the script that calls the page via cURL, it inserts a record in the database, but instead of registering a single record, it registers 2 equal. cURL.php <?php $ch...
asked by 25.07.2014 / 19:10
2
answers

Confirmation of site or host service status

I set up this script to run under Linux, but it is not working the way I expected it to be. I'm using curl to find the state of the HTTP connection. It returns me: HTTP/1.1 200 OK Mais alguns conteúdos do site http... This is t...
asked by 12.11.2018 / 20:39
1
answer

cURL failed to send array

Well, I have a small problem sending cURL data, when I send the data to the API it returns me that there is one of the fields that is not an array: {"errors":["items deveria ser um Array"]} Code: $user = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $...
asked by 02.10.2018 / 15:02
1
answer

Redirect with curl

I'm trying to login to a curl account but it does not go to the final page. Site map: form page. page that receives the post (the curl is stopped here). 200 OK Restricted page (curl does not arrive here). 302 Object moved Does anyo...
asked by 07.10.2018 / 05:04