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
-1
votes
1 answer

What is the equivalent of curl_multi_exec in Guzzle?

I'm trying using the following curl function to create multiple webhooks at once using CURL which i think is making async calls that's why it processed so fast compared to do it using curl_exec, now i'm wondering how to get the same result using…
Ana
  • 1
-1
votes
1 answer

How to download file Using PHP that has delayed force download?

I am at a situation, where I need to download files from the URL, it is easy with the direct file URLs like https://somedomain.com/some-path/somefile.exe file_put_contents( $save_file_loc, file_get_contents($url_to_download); But what to do when…
-1
votes
1 answer

Convert curl to wp_remote_post

can someone help me to convert following curl command to wp_remote_post. $ServerParam = 'VERSION=1.00&PWD='.$this->password.'&ID=' .$this->id.'&KEY='.$this->key.'&HASH='.$sHash; $options = array ( …
-1
votes
1 answer

Udemy Affiliate API - Authentication Error (403 Notice Array to string conversion)

I'm trying to use the Udemy API with the correct answer from this Stackoverflow's post: curl request in udemy api is not working header('Content-Type: application/json'); $url = "https://www.udemy.com/api-2.0/courses"; // Initiate curl $ch =…
Seb
  • 145
  • 1
  • 3
  • 11
-1
votes
1 answer

I want to download a proxylist with curl in php

I want to download a proxy list with this api: https://api.proxyscrape.com?request=getproxies&proxytype=http&timeout=5000&country=US&anonymity=elite&ssl=yes how can I do it in php with curl??? When you open this url, It will automatically download a…
Shayan.Jpr
  • 13
  • 4
-1
votes
1 answer

Razorpay x Api call BAD_REQUEST_ERROR using Laravel

I am trying to integrate razorpay x api for creating contacts and this is the sample api request data from razorpay. reference_id and notes are optional. curl -u : \ -X POST https://api.razorpay.com/v1/contacts \ -H…
Web Developer
  • 47
  • 1
  • 8
-1
votes
1 answer

PHP cURL returns encrypted html page

I'm trying to get simple html code, from cURL GET-request on PHP. Default get-request on url, like http://example.com/ (not exacly this domain), returns html code I need, but get-request on page of this domain, like http://example.com/something…
-1
votes
3 answers

How to prevent other website or domain from download our content and display it via CURL on their domain?

Recently we found our websites created on our domain gets automatically copied or mirrored at a different unknown domain website. These unknown websites at unknown domain are updating automatically whenever we update our…
-1
votes
1 answer

Calling api using php curl?

I am calling a sms gateway api and below is my code. $otp="1234"; $mobile_number=1234567890; $username = 123456; $hash = 1234; $from = "SENDER"; $message="Your one time password is ".$otp.""; $payload =…
Web Developer
  • 47
  • 1
  • 8
-1
votes
1 answer

Why do I need curl-ca-bundle.crt?

For college, I've made a dynamic news website which uses openweathermap and ipinfo to create a little weather info line in the navbar. Initially it threw an error 'failed loading cafile stream' which was solved by installing a CA certificate in…
-1
votes
2 answers

How to not allow cURL in PHP to access local addresses?

I have setup an online php curl http header retriever. How it works: a user goes to the url https://www.example.com/header/, then there is an input field where the user can enter a domain name. And click Submit. Then PHP uses curl to retrieve http…
Example person
  • 3,198
  • 3
  • 18
  • 45
-1
votes
1 answer

Opening multiple urls with CURL - Using api with CURL - too many urls and too slow

I have a software. There is a table, there are URLs in this table. There are 100 URLs on each page. picture Then I got an API where I can pull Alexa and DA Values. I wanted to show these values ​​later.
xquaL
  • 13
  • 3
-1
votes
3 answers

How to pass PHP $variables in cURL array

I would like to pass some simple PHP variables (such as $name1 and $email1) to the following cURL block (PHP-Curl) CURLOPT_POSTFIELDS =>"{\n\"email\": \"percy.jackson@gmail.com\",\n\"name\": \"Percy Jack\",}" Basically…
-1
votes
1 answer

how can I add a contact to a group in google contacts api v3 with PHP

I try to add a Contact to a Group. But it Responses with HTTP-CODE: 400 (Bad Request). What is going wrong? Here is the Code with the 400 Bad Request Error: /** config: */ $access_token = "YOUR_ACCESS_TOKEN"; //example:…
-1
votes
1 answer

Trying to make a cURL request in PHP with ---location parameter

I want to cURL the following request in PHP: curl --location --request GET 'xxx.xxxxxad.com/api/rest/issues?project_id=4' -H 'Authorization:xxxxxxxxxxxxxxxxxxxxxxxxxxxHTb' The code that I implemented was: