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

How to authenticate using php and javascript

I have been at this for weeks and need some direction. I am not using MongoDB or Phoenix, etc. I am using php (Laravel) and the core of my data is JSON. I want to save data right from javascript. So user's data is saving locally in pouchdb, one…
J Chadwick
  • 15
  • 1
  • 4
-2
votes
2 answers

Fatal Error Maximum Time Execution, in API Requst, I php

I do some API request use php(cURL), but I have problem in cURL_exec(), for some case it always Fatal error max. execution. How to fix it? really need help
-2
votes
1 answer

Try check the output of the array sent by GET request

private $api_url= "www.myurl.com"; private $api_key = "111abjkbjkvsdf3879"; private function getpage($url, $redirect=FALSE) { $url = $this->purge_url($url); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch,…
antrez770
  • 13
  • 8
-2
votes
1 answer

I am not getting readable format data using CURL?

Below is my code $url = 'http://api.walmartlabs.com/v1/feeds/bestsellers?apikey=xxxxx'; $ch = curl_init(); curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( …
-2
votes
2 answers

How to make curl command into php?

I have this curl command curl -L -O -o ' .$path.' -J "https://drive.google.com/uc?export=download&id='.$id.'" How would I transform this into php curl request keeping in mind all the flags. what are the equivalents in php Here is what I have so…
-2
votes
1 answer

Convert cURL to PHP cURL - DocParser API

I have one cURL: curl \ -u : \ -F "file=@/home/your/local/file.jpdf" \ https://api.docparser.com/v1/document/upload/ I am referring document: https://dev.docparser.com/#import-documents I am not knowing how I…
Sharad Soni
  • 378
  • 1
  • 5
  • 18
-2
votes
1 answer

Perform GET request with an XML parameter (PHP cURL)

I'm trying to implement this API method and sending a GET request using PHP cURL. Here is my code: $url =…
Adeel Ahmad
  • 1,033
  • 1
  • 11
  • 24
-2
votes
1 answer

How can I receive captcha image (using PHP cURL)

From the code you see below, even though I tried for a long time, I do not get any data. Unfortunately, when I view the browser a captcha comes the first time. I tried refreshing the page but I get a blank page. In addition, there is another page…
-2
votes
1 answer

Android novice needs help on android server interaction

I have a backend app in Django for which we need to send some data by the frontend. Using cURL with php we do it in the following way:
Apurva Jha
  • 25
  • 1
  • 6
-3
votes
0 answers

Why doesn't strpos work with this API call?

I am running the following PHP curl command: curl_setopt($curl, CURLOPT_URL, "https://my-api-endpoint"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($curl, CURLOPT_POST,…
HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158
-3
votes
1 answer

Uploading a file to Google Signed URL with PHP cURL

I am trying to upload a file to a Google Signed URL with cURL in PHP. I have the file being posted from a form and can access it with the $_FILES var. However the file that actually gets uploaded is not the right file and I think it is to do with…
Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76
-3
votes
1 answer

How to upload video using put.re api (using CURL)

I want to upload videos to put.re, a file hosting provider using php curl I tried this code: foreach ($_FILES['uploadvid']['tmp_name'] as $index => $fileTmpName) { $fileName = $_FILES['uploadvid']['name']; $size =…
-3
votes
1 answer

What is wrong with this CURL call in PHP?

$POSTFIELDS = array( 'email' => "fodil@usa.com", 'phone' => "656565465422", ); curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents("php://input") . "&" . $POSTFIELDS); I…
npolio
  • 11
  • 2
-3
votes
1 answer

how to use cURL API, from a video host 'MyStream.to' in PHP

how to use cURL API, from a video host 'MyStream.to' in php! API DOCUMENTATION FOR MyStream.to 1 This is the code that the documentation shows me : curl "https://api.mystream.to/v1/files/:page" -H "Authorization: ACCESS_TOKEN" -D 2 I also tried…
Ol Mimud
  • 9
  • 3
-3
votes
2 answers

Type of 'json' response is boolean in PHP

I am using the following: $url, CURLOPT_CUSTOMREQUEST => "GET" )); $response = curl_exec($curl); $err =…
hello_its_me
  • 743
  • 2
  • 19
  • 52
1 2 3
87
88