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

gmail api php curl create filters with oauth2

I try to use CURL with PHP to create filters with GMAIL API. So far I managed to create/delete new users, add and delete labels but I block for that part. Here is the code :
user4167123
0
votes
0 answers

PHP Still Loads Old Version of cURL after upgrade

Debian 14.04, FPM, PHP 5.5.x. Had to upgrade cURL from 7.35 to 7.47.1. After upgrade version shows correct 7.47.1; however, info.php shows 7.35. My educated guess is the curl.so extension is still 7.35 that the php.ini is pointing to; however, how…
0
votes
0 answers

Command line Curl to PHP curl for FitBit

I have this command that runs from command line perfectly, and I need to transform it into PHP curl and get headers for response. What it would look like? curl -X POST -i -H 'Authorization: OAuth oauth_consumer_key="abcdrsldkfj",…
George Mylonas
  • 704
  • 6
  • 16
0
votes
3 answers

php curl Response is including the HTTP Header in a JSON response

I am encountering an issue where once curl is explicitly set to use CURLOPT_HEADER, all the responses I get from a REST Endpoint (SugarCRM 7) will include the full HTTP Header. I did this so I can get and store Cookies for session management, but…
Cameron Kilgore
  • 383
  • 7
  • 25
0
votes
0 answers

How to find enable php curl on windows using php 5.6.17?

I am trying to run .php scripts on windows machine. I first tried older version of php which was php 5.4.6 and enabled php_curl on php.ini(found in php folder) and after running my script using cmd(c:\php\php.exe test.php) (i got this error: php…
user1788736
  • 2,727
  • 20
  • 66
  • 110
0
votes
0 answers

cURL is not always synchronous

This question follows on from one of my previous ones. The modified large file upload script I am now using is shown below function uploadFile($local,$remote,$token) { $args = 'Dropbox-API-Arg:'. …
DroidOS
  • 8,530
  • 16
  • 99
  • 171
0
votes
1 answer

Login to WS1 using curl

I'm trying to login into ws1.com using curl, however whenever i put the POST to true I'm getting error: Bad Request, this is the code that i tried:
SniperCoder
  • 823
  • 2
  • 11
  • 23
0
votes
0 answers

Passing SESSION with CURL

I'm pretending to pass a COOKIE_FILE to another script because I'm using php Curl to make some petitions and I need some of the SESSION variables there, in the main script I have: define("COOKIE_FILE", "cookie.txt"); $options =…
Sredny M Casanova
  • 4,735
  • 21
  • 70
  • 115
0
votes
1 answer

PHP extension "curl" must be loaded persists even after enabling it

Even after enabling the PHP curl extention in WAMP>PHP>PHP extentions, i get the same error while installing magento ! the error also occurred for SOAP, but it was cleared when i enabled the extention. its not working with CURL ! what i must do ?
Sam
  • 67
  • 4
  • 12
0
votes
0 answers

Different response using curl CLI interface and php curl function

Basically I'm trying to fetch live scores of soccer matches and add them to a personal database on my server. This works nearly as expected, execpt for one thing: I use a PHP script to automatically fetch the score and insert it into the database. I…
johabu
  • 173
  • 1
  • 1
  • 10
0
votes
1 answer

Curl_init not working string 'couldn't open file ""' (length=21)

Am trying to test a vulnerability on my wordpress site and using curl to test it out. However it seems that the curl is not working.
Kheshav Sewnundun
  • 1,236
  • 15
  • 37
0
votes
1 answer

How do I get the ErrorCode variable value from the response variable after message sending using CURL?

After executing CURL I am getting the $result variable value as: { "ErrorCode": "000", "ErrorMessage": "Success", "JobId": "6878b812-766d-48a2-9dae-2b0edf2d84d4", "MessageData": [{ "Number": "919730842844", …
N.R
  • 191
  • 1
  • 13
0
votes
0 answers

php-curl doesn't connect to remote host and header appear to be empty

I configured one of my server to accept files via post, convert them and send them as response. A php server uses this functionality via curl. The important part in my php script looks like this $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,…
relgukxilef
  • 343
  • 6
  • 13
0
votes
1 answer

PHP Curl to PHP DOMDocument

Here is a same of code I have extracted from a webpage...
Profession
user3411692
0
votes
1 answer

Box api v2 upload file using php

I have been working on box api. I could get everything to work but the file upload. Here is the code: $path = 'https://upload.box.com/api/2.0/files/content'; $method = 'POST'; $headers = array('Authorization Bearer ' . $accessToken); $attributes =…