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

PHP curl_multi_getcontent Always Outputs the content

I am building a site "monitor", and have decided to utilize curl_multi_* due to the number of sites I need to monitor as well as the multiple curl pulls I need to make per iteration. CODE: https://gitlab.com/snippets/1739288 (too much to post here,…
Kevin
  • 2,684
  • 6
  • 35
  • 64
-1
votes
2 answers

Get youtube channel data in array

i am trying to get Youtube channel data with that api https://www.googleapis.com/youtube/v3/channels?part=snippet,contentDetails,statistics&id={ Channel Id }&key={ API } I used that code to fetch the data if( $_SERVER[ 'REQUEST_METHOD' ] ==…
-1
votes
1 answer

php curl login to espn.com

Im trying so many different things and not finding any solution, in order to login using cUrl to http://www.espn.com/login/ and after login i want to retrieve a protected password area…
-1
votes
1 answer

how to search data from other website using curl

Hi how can i search data from other website using curl and php. i want to search imei number from this website https://www.example.com/xxx this is what i have tried so far $imei = '013887009861498'; $cookie_file_path = "cookies/cookiejar.txt"; $fp…
abid
  • 25
  • 5
-1
votes
1 answer

How to load Json Array with php Curl or file_get_contents()?

I'm trying to load Json array from this URL What I tried so far is following: //By Using File_get_contents() $insta_source = file_get_contents($url); $insta_array = json_decode($insta_source, TRUE); var_dump($insta_array); //AND //By Using php…
Qcr Technologies
  • 91
  • 1
  • 2
  • 8
-1
votes
1 answer

Curl installation Ubuntu PHP 7 failing - package not found

Trying to install php-curl at ubuntu keeps failing. I have PHP7 at: Distributor ID: Ubuntu Description: Ubuntu 16.10 Release: 16.10 Codename: yakkety Tried running sudo apt-get install php7.0-curl And sudo apt-get install…
Guilherme Ferreira
  • 2,209
  • 21
  • 23
-1
votes
2 answers

PHP check image if exists and return a text if not

I found this solution, because @getimagesize was horrible slow: function get_image_by_id($ID) { $url = $ID; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); $info =…
MysticUnicorn
  • 119
  • 12
-1
votes
1 answer

PHP web scraper get part of page

I develop a web scraper with PHP and I was faced with the problem of low data processing speed. When I load a web page I receive too much unnecessary data. Is there any way to receive not the whole page but only pieces? Specific HTML tag and its…
Evgtar
  • 1
  • 1
-1
votes
1 answer

get UNICODE character instead of HEX - cURL PHP

I am using this scraper for IMDB, and the problem is that some characters are in UNICODE ï. I use this scraper with CURL, and the answer its a string encoded in UTF8 I try to get the encode of the string with mb_detect_encoding() and it answer…
Merlyn007
  • 434
  • 1
  • 8
  • 21
-1
votes
1 answer

mySQL with alias field names failing in curl_exec PHP call

I have a simple method that calls a PHP script for data using curl_exec. function load_entry_list($url) { // Initialize an empty array to store entries $entries = array(); // Load the data from the API $ch = curl_init();…
JStevens
  • 2,090
  • 1
  • 22
  • 26
-1
votes
1 answer

ParseXML Data fields with Attributes using PHP cURL from API Result

This might be quite usual for some of you but I'm not familiar with XML Data Parsing using PHP as you might be! Situation My client's company (e-Commerce) has a tie-up with a Logistics Company which has its own API for tracking…
Alpha
  • 321
  • 6
  • 16
-1
votes
2 answers

( "Message":"Authorization has been denied for this request.")

Trying to get a list of cashbooks from API, but always comes back with ( "Message":"Authorization has been denied for this request."). I'm positive the subscription key is right, I can get the access and refresh tokens, and the user I login to the…
-1
votes
2 answers

Can cUrl redirect to URL (post) page?

After executing cUrl method, my browser stays on same page, but loads content of page called in a curl init. Is it possible to redirect browser to that URL? $ch=curl_init($URL); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,…
user198003
  • 11,029
  • 28
  • 94
  • 152
-1
votes
1 answer

PHP CURL. Can someone help me regarding this?

I'm currently have a problem. It's my coded curl for logging into the a specific website. I hope someone good out there check into my problem what is really happening :) Here is my code for the functions: class curl { private…
UG-Clarck
  • 5
  • 3
-1
votes
1 answer

PHP echo CSRF & STATE not appearing

Greetings StacksOverFlow Devs, I'm trying to figure out earlier why the hidden input values at the website not appearing when I try to echo it and I used preg_match_all and made the hidden value POST. I want to echo both at the same time but that is…
UG-Clarck
  • 5
  • 3