You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
I have a website in which I have used the following curl commands to load the contents of a file into a web page:
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, WB_URL.'/pages/blocks/meeting.php');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
This is no longer working. I am thinking there has been a change in syntax. Can anyone advise how I can correct this, please.
I only use Curl occasionally, I'd check which version you have installed. Lastest update was 5 Jan.
Changelog here: https://curl.se/changes.html#7_81_0
Can't see anything obvious.
Have you checked the source data is still in the same place with the same permissions etc?
If there's an issue with the code it should be spitting out an error somewhere.
Although I'd agree with the above. It's more likely to be something outside of the code. It may still be spitting out an error somewhere.
That's kinda php, rather than curl.
And wow, what a horror show that is.
(I doubt curl or the php library has changed enough for either of them to be the issue. Perhaps whereever you have it hosted has changed it so that php can no longer call out to external binaries, or restricted access to the relevant website. Assuming the relevant website hasn't just gone away.)