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
2
votes
0 answers

Video uploaded via API(v3) not attach to my account in Imgur

Code Snippet: Here is my code snippet: function uploadByCurl($uploadFilePath, $accessToken){ $ch = curl_init(); $mimeType = mime_content_type($uploadFilePath); $fileType = ''; if(strpos($mimeType, 'image')!==false){ $fileType…
Willis
  • 599
  • 3
  • 25
2
votes
1 answer

verifying apple receipt with PHP is not working sometime

I'm using below code to verify apple receipt using PHP, using CURL i'm calling apple server and trying to get response.This code is working fine but sometimes apple JSON response is coming empty and i'm not getting any error message also. It just…
2
votes
0 answers

PHP curl_multi_init change proxy

I would like to make some simultaneous requests with curl_multi_init using proxies but I don't know how to check in a request if the proxy is banned and then change the proxy and restart the request. Thank you My code :
Errorj404
  • 43
  • 8
2
votes
0 answers

Can I use free proxies with curl safely

Can I be sure my communication won't be readable connecting to https websites through free proxies using curl like that: $curl=curl_init(); curl_setopt($curl, CURLOPT_CAPATH, $mycapath); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,…
Entretoize
  • 2,124
  • 3
  • 23
  • 44
2
votes
1 answer

How can I upload files to GoogleDrive in "multipart" type by using php-curl?

I want to upload in using php curl other than google-api-php-client, but I really don't know how to do it, here is the documentation:Send a multipart upload request Here is my code snippet, I stuck in CURLOPT_POSTFIELDS, can anybody help me with…
Willis
  • 599
  • 3
  • 25
2
votes
1 answer

How can I get share link from Google Drive REST api v3?

After uploading a file to GoogleDrive, I can get an fileId from the response, then I pass the fileId to the following function: public function createShareLink($fileId, $accessToken){ $ch = curl_init(); $options = [ CURLOPT_URL => …
Willis
  • 599
  • 3
  • 25
2
votes
0 answers

how can i fix php multi curl keep on loading some times

Hi am using multi curl for the first time. seems endless and reach my PHP execution limit.i can see it hitsserver(http://samples.com/attraction1w1.1/ServiceMobile.php) and server also responding successfully but multi curl response not getting.tried…
2
votes
0 answers

OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab:443

I'm having some issues with OpenSSL. I'm facing an error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab:443 first of all, everything was ok, I cloned a project, but when I run the project (the project was about accessing telegram…
Nimdeveloper
  • 376
  • 4
  • 17
2
votes
1 answer

Magento 2 installation on Manjaro (Arch Linux) ~ php extension missing

I am installing Magento 2 on my system and after a lot of fiddeling around, I finally got to the localhost setup wizard. The following problem occured in the readiness-check-install screen (there are a couple of  solutions online, I already tried…
Stephan T.
  • 5,843
  • 3
  • 20
  • 42
2
votes
1 answer

force PHP-Curl to use TLS 1.3

Hello i want use the FineTS HBCI Api of the Sparkasse Bautzen, they send me a list of Ciphers who are not supported anymore. TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (0xc012) TLS_RSA_WITH_AES_128_GCM_SHA256 (0x9c) TLS_RSA_WITH_AES_256_GCM_SHA384…
StefanBD
  • 334
  • 3
  • 14
2
votes
1 answer

How to include "compressed" parameter in curl functions in PHP?

Ineed to make a request exactly like the browser does it with CURL and PHP, when a copy as Curl (cmd) i see this headers: curl "https://www.w3schools.com/js/ajax_info.txt" -H "Sec-Fetch-Mode: cors" -H "referer:…
2
votes
1 answer

how to send curl request for delete image from s3 bucket in php

function S3_delete($s3_array) { $AWSAccessKeyId = 'youraccesskey'; $AWSSecretAccessKey = 'yoursecretaccesskey'; $BucketName = 'yourbucket'; $AWSRegion = 'ap-south-1'; …
2
votes
0 answers

Sending a chunked file with curl and receiving

I have created two file php. The first one for send a file through curl utilizing the chunking method. And a second one for receiving the file. What I need is to send a chunked file with curl and receive it. However, I am not really sure that the…
Lorenzo
  • 200
  • 2
  • 13
2
votes
0 answers

PHP Curl Reuse Optimization

So currently I am working with a REST API provided by a third party tool that requires me to make thousands of requests per run of my script. For the most part, everything works well the only issue is that it takes some time. Now that the logic is…
97WaterPolo
  • 375
  • 1
  • 3
  • 24
2
votes
1 answer

Is there any way to urlencode/escape while Curl is Following Location?

I am doing Api integration of SEB open banking while Curl follow location it is not encoding the url as normal browser do. $url = 'https://api-sandbox.sebgroup.com/mga/sps/oauth/oauth20/authorize?' .…