Questions tagged [php-curl]

PHP cURL extension for HTTP requests

PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.

These functions have been added in PHP 4.0.2.

Source

1306 questions
4
votes
1 answer

URL error 0: The cURL request was retried 3 times and did not succeed

I am working on a project that is hosted on Google App Engine, and using app_devserver for local development. At the start I had problems with certificates but when I finally got over that error I am getting this new error I am using Windows 10 and…
Asim
  • 936
  • 2
  • 10
  • 29
4
votes
2 answers

Getting correct encoding from php cURL

(see update at bottom of post) Using the Chrome network logger, I notice a given XHR request: Request Headers GET ... HTTP/1.1 Host: ... Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like…
X33
  • 1,310
  • 16
  • 37
4
votes
1 answer

Convert curl-command to php curl

Im trying to convert a curl-statement with an authentication header to a php curl request. But it doesn't seem to be working, because I receive the error below with echo 'error:' . curl_error($ch);: error:SSL certificate problem: unable to get local…
fsulser
  • 853
  • 2
  • 10
  • 34
4
votes
1 answer

GCM curl operation time out

I have a couple of php files responsible for GCM operations stored on my server, they seem to work just fine when they want to but they often return an error that states: Curl error: Operation timed out after 0 milliseconds with 0 out of 0 bytes…
spongyboss
  • 8,016
  • 15
  • 48
  • 65
4
votes
2 answers

Specify source port range with curl using PHP

I need to specify the source port range for curl. I don't see any option who let me choose a range for source port in TCP. Is it possible?
hotips
  • 2,575
  • 7
  • 42
  • 59
3
votes
1 answer

PHP cURL: Encoding/Parsing (AWS Neptune using SPARQL)

I'm new to SPARQL so this might be a dumb question but I'm having troubles inserting data. I'm using the HTTPS REST endpoint to communicate with the DB. I have the following triple: "This is a literal" Which…
Orry
  • 659
  • 6
  • 21
3
votes
2 answers

PHP - POST request with binary body data - Works with CURL, but not with Laravel

I have below 3rd party API that I am posting images to. They require that the header's content-type must be set to: Content-Type: image/jpeg, and that the body contains the binary data of the actual image. Below I am making this request using cURL…
oliverbj
  • 5,771
  • 27
  • 83
  • 178
3
votes
1 answer

How to submit custom POST form via cURL PHP in wordpress

I'm making a theme wordpress use childtheme in localhost. I had a basic form html in footer.php:
3
votes
1 answer

Translator Text API | Microsoft Azure | Always ERROR 401000

I tried to test Microsoft Translator API Text v3.0 but failed with 401 Access denied. I do standard cURL requests (HTTP POST) using PHP 7.3. $key = "************************"; // secret key here (from the Azure Portal) $host =…
3
votes
1 answer

Does PHP cURL extension in version 7.4.2 support cURL with HTTP/3

Can I curl a website that supports HTTP/3, with curl, using HTTP/3 instead of HTTP/2, HTTP/1.1 or HTTP/1.0. Is this possible? If so, how to do this?
Example person
  • 3,198
  • 3
  • 18
  • 45
3
votes
1 answer

Can't load module 'ext\\php_curl.dll' as it's linked with 9.0

I want to installed Apache24 with PHP 7.4.2 but I cannot get to work the curl modul. In php.ini I set extension dir (extension_dir = "ext") and enable the curl (extension=curl). But when I start Apache I get this error in log file: PHP Warning: PHP…
Sk1X1
  • 1,305
  • 5
  • 22
  • 50
3
votes
0 answers

curl options in symfony http-client

I'm refactoring some clients in a Symfony 4.3 project, to use Symfony http-client instead of Guzzle http-client. I'm stuck on a client that uses this option in its constructor: 'curl.options' => [CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2] I've…
Marco
  • 31
  • 1
  • 3
3
votes
0 answers

How do I pass Gravity Form entries to a third-party website (CRM)?

A business owner has a site on WordPress that has the same Gravity Forms form on every page where prospects can request a quote. Whenever someone submits a form, that information would be passed along and the customer would be logged as a prospect…
hnhicks
  • 31
  • 1
3
votes
1 answer

Laravel backup error uploading large backup to s3

I have a Laravel project that creates a new backup daily using spatie/laravel-backup and uploads it to s3. It is properly configured, and it has been working for over a year without a problem. Suddenly, the backup can't complete the upload process…
gbalduzzi
  • 9,356
  • 28
  • 58
3
votes
2 answers

curl php HTTP/2 stream 0 was not closed cleanly

I am trying to send a request using cURL and PHP and it throws an error. HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) I am sending CURLOPT_HTTP_VERSION like this curl_setopt($ch, CURLOPT_HTTP_VERSION,…
Mubin
  • 4,325
  • 5
  • 33
  • 55