Relative Content

Tag Archive for phpcurl

php cURL handle timeout

I have a cURL call where I know the URL has been timing out (I get a 504 gateway timeout when I put the URL in my browser). I would like to handle this and present the user with a descriptive error, rather than just the 500 server error they are encountering currently.

Get the contents of a variable from an external file and display the contents

The file “versionen.php” is in the “dataplace” folder in all defined domain-accounts.
I would like to use the following script to read and output the “$software_version” variable for all defined domains on an external domain.
The “$software_version” variable is in the “versionen.php” file and is also displayed correctly locally.
The URL is loaded correctly, which is also displayed correctly by the Else branch of “if ($content === false) {“.
The domains are displayed correctly in the test output, but “Software-Empty” is always displayed for “$version”.
I just can’t get the content of the “$software_version” variable to work.
What have I not taken into account? What needs to be changed/added?

Php CURL cookie with 24-hour session

I have a curl script that takes data from my personal account on another site, the problem is that the script works only 24 hours (the session on the site is set to 24 hours), when 24 hours pass my script no longer works and I get a response that the session is out of date. how do I update the session in curl every 24 hours?

UNABLE TO INSTALL php8.2-curl

apt install php8.2-curl Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package php8.2-curl E: Couldn’t find any package by glob ‘php8.2-curl’ E: Couldn’t find any package by regex ‘php8.2-curl’ Then tried: apt install php-curl Reading package lists… Done Building dependency tree Reading state information… Done Some packages could […]