1,337 questions
1
vote
0
answers
127
views
Why does CURL return bad timing results when process is forked (in PHP)?
I'm trying to replicate the ab stress tool (ApacheBench) in PHP to have more control depending on the content of the result.
However, I'm getting weird results when trying to make requests through ...
0
votes
1
answer
72
views
Why can I only retrieve files through the API that were previously added using the API in Google Drive?
I'm integrating Google Drive with my PHP application.
Uploading files via the API works perfectly — I can upload files using the API.
However, when I upload files manually in browser to the same ...
1
vote
0
answers
47
views
LinkedIn UGC Posts API returns empty elements array despite valid access token (2025 link policy compliant)
I have a LinkedIn app shared by my client. Using my org ID in /v2/ugcPosts, I get results correctly. But when I switch to the client’s organization ID, I get an empty elements array even though total &...
1
vote
1
answer
59
views
How to get Referrer value using CURLINFO or cURL
How to get Referrer value from cURL URL? I am trying something like this but not working.
$curldomain = "https://www.example.com/";
$ch = curl_init($curldomain);
// Set cURL options
...
1
vote
1
answer
122
views
Is possible to spoof HTTP Header Referer value using cURL
Let say, my website is https://www.example.com and i am using cURL to pull https://stackoverflow.com
I am using cURL HTTP Header to spoof referer value like this
curl_setopt($ch, CURLOPT_HTTPHEADER, ['...
0
votes
0
answers
82
views
Why is API key not being recognized?
Google Maps discontinued Directions and DistanceMatrix a couple of weeks ago and I am trying to adapt CURL code in PHP to switch over to the Routes API. There does not seem to yet be any handy pre-...
0
votes
0
answers
117
views
How to correctly structure a request for PhonePe Auto-Debit API (/v3/recurring/debit/init)?
I am integrating PhonePe's Auto-Debit API (/v3/recurring/debit/init) but keep receiving the following error response:
{
"status": "error",
"message": "Please ...
1
vote
1
answer
45
views
cookie jar not saving cookies
function 3rd_party(){
$cookie_path = __DIR__ . '/cookies.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'xyz.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
...
0
votes
0
answers
29
views
Jwt for login with rest
First time trying to do a jwt authentication.
I’m sending username and password from my website to another webapp by curl_php, receiving back a json array with a jwt among more data.
I have to ...
1
vote
1
answer
429
views
indexnow submissions and how they are reflected in Bing Webmaster Tools
Having found out that only about 20% of my website pages (and not including the home page) are indexed by Bing (where Google indexes them all happily), I have been trying the IndexNow functionality ...
1
vote
0
answers
49
views
Using cURL in PHP to post multi-part data held in variable rather than on disk [duplicate]
I am finding it surprisingly difficult to post an image that I have manipulated using GD image to an API without first saving it to disk. It seems like there must be some way to post the GD image ...
1
vote
1
answer
79
views
Extract video data from api response using PHP [duplicate]
I am using the following cURL in PHP for an API request to obtain a video file as recommended by the api provider. That is the extent of their documentation.
$curl = curl_init($url);
curl_setopt($...
0
votes
0
answers
63
views
Curl is returning response but Laravel Http client is not returnig respose
-> The below code is based on php Curl.
$curl = curl_init();
// API Endpoint
$url = 'https://api.bybit.com/fht/compliance/tax/v3/private/registertime';
curl_setopt_array($curl, array(
CURLOPT_URL =...
0
votes
0
answers
83
views
Install PHP cURL on Debian Jessie running PHP 7.0.33
Before we get started, if we could bypass the whole you "need to update" please? Thank you.
I would like to install the PHP cURL extension on a Debian server (Jessie) running PHP 7.0.33
# ...
2
votes
0
answers
62
views
When using curl_multi_* there is around 20 iterations for one request despite curl_multi_select use. Why?
From the documentation for the curl_multi_select:
Blocks the execution of the script until a cURL handle attached to the cURL multi handle would be able to make progress on the next call to ...
1
vote
1
answer
78
views
php curl receveive 302 response code from OVH
In the last few days/weeks, a webservice call from php curl to a service located in OVH has started receiving a "302" HTTP Code response
I thought the calling server was blacklisted.
But the ...
1
vote
1
answer
108
views
CURL (PHP) works locally but it doesn't on remote server (curl_error #26)
I try to send photo via Telegram bot, so I wrote the code (a part of it):
$img_path = "https://www.example.com/path/to/file.jpg";
$method = "sendPhoto";
$arrayQuery = array(
&...
-1
votes
1
answer
35
views
Error:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
I am trying to make an HTTPS request using cURL in PHP 5.6 (I am forced to use 5.6 due to my environment), but I keep encountering the following error:
error:140770FC:SSL routines:...
2
votes
2
answers
53
views
Make interval for PROGRESSFUNCTION in PHP CURL?
With below code
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'progress_upload');
progress_upload function will be triggered many times in a second but ...
0
votes
0
answers
45
views
Cookie curl on two ec2s
My old project code is saving curl cookie to temporary file as below
curl_setopt($ch, CURLOPT_COOKIEJAR, dir_tmp);
curl_setopt($ch, CURLOPT_COOKIEFILE, dir_tmp);
it is running on 1 ec2
Now need to ...
0
votes
0
answers
3k
views
Failed to connect to 18x.130.1x5.xxx port 10000: Connection timed out
I opened vps from azure ubuntu 20.04 and installed cyberpanel here, then I opened all incoming and outgoing ports in azure, I installed script, this script sends curl with proxy but I get error "...
1
vote
0
answers
236
views
PHP CURLSSLOPT_NATIVE_CA returns 'SSL certificate problem: unable to get local issuer certificate'
I'm trying to access an url which has SSL certification and use https using php curl inside a Windows Server 2016 enviroment. The curl options in the php code are set as follows:
$curl = curl_init();
...
0
votes
0
answers
136
views
Has anyone successfully managed to configure a PHP class method to retrieve a CheckoutId for a Sumup Payment Widget
Our HTML/Javascript client sends a request to our PHP proxy Class and method to invoke the communication with the Sumup API.
The Sumup Developer Documentation appears to require three steps:
Use Curl ...
0
votes
1
answer
2k
views
XAMPP php 8.2.23 Unable to load dynamic library 'curl'
I'm running a local development environment on Windows using XAMPP with multiple PHP versions. I manually switch between the PHP versions by setting the correct paths in httpd-xampp.conf and updating ...
0
votes
1
answer
51
views
CURL - Sending PDF failing with Laravel
I'm sending a PDF file via CURL in Laravel:
<?php
namespace App\Http\Controllers\EmailSender;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;...
1
vote
1
answer
858
views
PHP8.3 - Can't load php_curl (Windows 11, Apache 2.4.53)
I can't get PHP8.3 (Win32-vs16-x64) running under Apache 2.4.53 (win64-VS16) to load php_curl, when Apache starts this error is logged:
PHP Warning: PHP Startup: Unable to load dynamic library 'curl'
...
0
votes
0
answers
65
views
PHP 7 CURL post request over 1024 characters timing out
I'm working in a Cake PHP 2 project running PHP 7.4. I'm trying to make a POST request via CURL to a server. I'm getting some odd behaviour with CURLOPT_POSTFIELDS. I need to send my data as an ...
0
votes
0
answers
46
views
Why do i get random characters as a response to my curl get call in php?
I am trying to get a list of deliveries using this GET call:
https://datalink.hconnect.digital/api-products/basic#get-https-//api.hconnect.digital/ecs/v2/deliveries
Here is a picture if the link is ...
0
votes
1
answer
3k
views
HikCentral Professional OpenAPI Authentication and JSON data fetch issue
I have been trying to call the parkingfee/calculate API using cURL PHP and I am able to get the 200 status code which means it reaches the server. But somehow the JSON data is not showing up even ...
1
vote
1
answer
867
views
Problem saving custom attribute for keycloak users
Context
I have a php website. Keycloak is used for auth. This part works fine.
I now try to save user related state to keycloak directly via its REST API (to not need another user db).
The Problem
...
0
votes
1
answer
644
views
400 Bad Request Error when requesting Azure Access Token for logged in user
I am setting up SSO for logins to my website from Microsoft login. When the user logs in to Microsoft and redirected back to my website, my site then requests and receives an access token. it works ...
1
vote
0
answers
30
views
PHP Proxy Redirecting / Page Change Logic Needed
I’ve been trying to make a web proxy using PHP and I always come to the same problem. When the user gets redirected on the proxied page or the page changes, it applies it to my proxy's site.
localhost:...
0
votes
0
answers
39
views
Having issue in writing cookie data to file using PHP Version 8 curl
I am trying to save cookie data when calling a page using CURL. When I run the same code on Server 1 then it works and if I run it on Server 2 then it doesn't work.
Server 1 Detail
PHP Version 7.2.24-...
0
votes
0
answers
35
views
I want to display the data I got from the fake api with the curl method
I want to display the information I received from the fake api using the curl method using foreach, and I get the following error:
Trying to access array offset on value of type int
<?php
$...
0
votes
2
answers
238
views
Call an API endpoint with Laravel controller
My Laravel API is running on 127:0.0.1:8000.
Now I want to call to this API
Route::get('/task/{task_id}', [TaskDetailsController::class, 'index']);
from my web controller
This is the function where I ...
1
vote
2
answers
387
views
Unable to Download PHP Files in DirectAdmin CustomBuild
I am encountering an issue with DirectAdmin's CustomBuild tool. When I attempt to build PHP using the built-in functionality in DirectAdmin's control panel, I receive the following error message:
...
1
vote
0
answers
2k
views
Apache/2.4.59 - PHP 8.3.6 Uncaught Error: Call to undefined function curl_init()
I'm encountering an issue loading cURL into my PHP environment on Windows. Here's what I've attempted:
I installed Apache on my server (Windows server 2016) and PHP 8.3.6. However, when I run php -m ...
1
vote
1
answer
474
views
SUMUP integration with curl in php
i'm trying to checkout a SUMUP payment and get allways:
*{"title":"Bad Request","status":400,"detail":"Required request body is missing: public org....
1
vote
0
answers
159
views
My PHP cURL Proxy isn't working and/or loading images or other files
I've tried making many proxies with PHP but they all end up with either headers not loading properly or images not loading properly. I'm very new to PHP and I've looked up how to make one but for my ...
1
vote
0
answers
89
views
cURL response returns data in Postman, but returns NULL data set in PHP
I'm trying to query a database from Google AppSheet via cURL. It works 100% in Postman (returns results), but when I copy the code into PHP it returns a NULL set (connects, but doesn't return results)....
2
votes
1
answer
818
views
PHP cUrl extension broken with v8.2.12 update
This has been driving me crazy now for a while.
When I updated my Windows PHP install from v8.2.11 to v8.2.12 (back in October) the cUrl extension stopped working. Previous versions had been working ...
1
vote
0
answers
50
views
PHP curl returns error but developer tools show success
I'm implementing oauth2 authorisation for our application, using keycloak to authenticate users. I successfully obtain a 'code' from keycloak. I submit this back to keycloak's rest api, to obtain a ...
1
vote
0
answers
28
views
shopify REST Admin API Response header doesn't includes a URL for the next page of results [duplicate]
According to the official shopify documentation , "https://shopify.dev/docs/api/usage/pagination-rest#make-a-request-for-paginated-data"
there will be a link to the next page in the response ...
1
vote
0
answers
135
views
How to add --proxy-header using Selenium webdriver in PHP?
Im using Selenium by WebDriver in PHP script.
As selenium browser I have Firefox configurated on my docker container.
I need to add proxy header with some values to set proxy settings according to my ...
0
votes
0
answers
28
views
how to send/Post json data from public network to private network in Codeignitor framework?
how to send/Post json data from public network to private network in Codeignitor framework ?
i
I want to post json data from Public network to private network using php (codeignitor Framework).
while ...
0
votes
0
answers
108
views
cURL_multi_exec Performance Issue?
I need to do 12 requests per second to the API on Twitch. I'm currently doing this with 3 processes, each doing 4 lookups per second but sequencially. I thought I'd give curl_multi a try so only 1 ...
-1
votes
1
answer
149
views
Get download link from private repo
In PHP, I'm trying to get the download link from my private repo with Github API.
I have refer to this doc: https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#download-a-repository-...
1
vote
1
answer
760
views
Trying to fix error code 7 with AlmaLinux 9 PHP 8.1 cURL?
I recently installed AlmaLinux 9 with LAMP and everything works correctly except cURL. I have verified cURL is installed and enabled. When I run the following code I receive
$url = 'http://example.com/...
0
votes
0
answers
114
views
I get a 403 error when I use the pricehubble api
I work with the priceHubble api.
When I make a request I get a 403 error with the following result:
{
"message": "Forbidden"
}
Here's my php code: (address taken at random in ...
0
votes
1
answer
385
views
I need help for adding individual schedules in my Tuya Weekly Schedule (PHP cURL)
I am working on a web site where users can control their thermostat, but I'm having difficulty with the schedule part. I can display it, but when I create a new schedule the temperature desired is not ...