Curl Support

My website URL is:

What I’m seeing is: CURL won’t work on infinity free. It works on but not here. Is CURL supported anymore? 3 years ago it was, is it still supported?

I believe CURL is still enabled for free hosting.

cURL is enabled and fully supported on free hosting. What problem do you experience exactly?

I am trying to use PHP to Post a message to a discord webhook.

The code, shown here. which I use, runs on but not here.

function postToDiscord($message)
$data = array(“content” => $message, “username” => “Webhooks”);
$curl = curl_init(“”);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, “POST”);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
return curl_exec($curl);

It looks like API using CURL don’t work here.
Pls check the KB article:

So if I understand you correctly, I can’t use PHP to Post a message to a discord webhook via CURL as I would be using an API while I am on the free plan?

Thank you for sharing the code. But what actually happens when you try to run the code? What is the error returned?

I put the code on

No error is returned, but the code takes a long time to load but doesn’t actually do anything. It comes up on a blank page with the words “Message sent successfully”, like expected but the actual message doesn’t pop up in the discord channel.

It just checked it and it seems that Discord is being blocked on our servers. We were forced to disable access to many social services due to rampant abuse (e.g. spam bots). So you cannot access Discord’s API from your free hosting account.

Ok, thank you for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.