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

cURL POST : how to send data as BODY of the request (not POST param)

I need to contact a WebService: this WS accepts only POST. For authenticating I have to send some JSON in the BODY of request while in the HEADER I have to send the WS method I want to call. This is a valid request sent using CLI (WS answers…
Bux
  • 57
  • 2
  • 11
-1
votes
1 answer

How To Generate HTML Table from Curl Response?

Hello How To Generate HTML Table from Curl Response ? `
-1
votes
1 answer

How to apply curlopt_postfields on Postman?

i have this curlopt_postfields code snippet CURLOPT_POSTFIELDS =>'{ "No":"893049193012", "Id":"test_1", "Token":"jkkhsjkhfkeiuryi" }' the question is how to apply these curlopt_postfields on postman? is it as parameter on parameter part? or on body…
berlin
  • 9
  • 4
-1
votes
2 answers

{"error":"no handler found for uri [/blog/article/1] and method [PUT]"} elasticsearch

I am trying to add data to elasticsearch with both PUT and POST curl -k -XPUT 'https://localhost:9200/blog/article/1' -d '{"title": "New version of Elasticsearch released!", "content": "Version 2.2 released today!", "priority": 10, "tags":…
Ankit Raj
  • 1
  • 2
-1
votes
1 answer

Getting curl response from CLI but access denied from PHP

For many requests I am getting access denied errors when using curl from php, my code is: $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); curl_setopt($ch, CURLOPT_URL, 'https://www.vueling.com/en'); …
Gixxy22
  • 507
  • 1
  • 8
  • 20
-1
votes
2 answers

How to get data for specific condtion in php curl

'url here' which contains a data key and the value is a string which contains items in the format: key=STRING, age=INTEGER. My goal is to count how many items exist that have an age equal to or greater than 50, and print this final value. $ch =…
Praff
  • 41
  • 5
-1
votes
1 answer

How to parse a xml string to array in PHP?

I am using an API that give me a XML response (with Curl) I need to parse the response to get a specific value I follow the php documentation Forty What? Joe
Jonathan COHEN
  • 125
  • 1
  • 2
  • 8
-1
votes
1 answer

The request of PHP cURL produces 403

I have got a problem with a PHP cURL request, it displays the 403 error. In Postman and a browser the URL works fine and Postman produced the PHP cURL code which is below but show 403 error anyway. I guess there is a cookie being generated in the…
qqruza
  • 1,385
  • 4
  • 20
  • 41
-1
votes
2 answers

send cURL Request in PHP

I want to send a request to : https://api.nobitex.ir/ Like this : https://api.nobitex.ir/v2/orderbook/BTCUSDT in php or laravel. Can someone help me ?
-1
votes
1 answer

how to send a Data Form including file, from PHP ContactForm7 with Curl

On my website, I use ContactForm7 to ask data and a file to users. Besides the automatic email sent by contactForm, I have a PHP function that retrieve the form data, and send them to my Node server to make some analysis. My problem is sending the…
DeLac
  • 1,068
  • 13
  • 43
-1
votes
1 answer

Want to get the CSRF Token from this text in CURL PHP

I'm trying to get the CSRF token from raw text, basically, I have a lot of text data on PAGE, I have almost 5-10 CSRF tokens on that page all are the same, I just want to grab one csrf token from text and save into in PHP variable.
kashifaws
  • 38
  • 8
-1
votes
1 answer

curl triggering open_basedir

I have a php (php-fpm) script script1.php running in /var/www/html/folder1/script1.php, protected with open_basedir "/var/www/html/folder1". From that script, I call a 2nd script script2.php located in /var/www/html/folder2/script2.php through…
Sebas
  • 21,192
  • 9
  • 55
  • 109
-1
votes
1 answer

Grab Specific Values From Similarweb

I am trying to get some values from similarweb using curls and simple_html_dom, but i can't grab only the value that i want. It gives me outpt all the page. I am using the code bellow (this code works for other sites).
Irene Lorkos
  • 41
  • 1
  • 7
-1
votes
1 answer

VirusTotal API via PHP CURL gives error 'empty filename'

So I am uploading file via
. After upload I need to send the file to virustotal API for scanning. But I get the error: { "error": { "message": "Received file with an empty filename. Please…
lwd
  • 37
  • 6