Error connecting server - PHP code command

Asked Dec 10, 2024·1 reply·Last activity 1 year ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi!

So im helping a friend creating some commands for his twitch account
And I saw free hosting services in order to have the PHP code (this is infinityfree)

PHP codes are simple and is working fine, so I did the addcom

!addcom !pp $(user) $(urlfetch https://freedomainwhatever..../ppsize.php )
But the response from Nightbot is: "Error Connecting To Remote Server"

Tried to switch it up to another coding
1. !addcom !pp $(eval const number=Math.floor(Math.random()*40)+1; const message=number<9?"Is it cold there?":number<15?"It's growing up.":number<26?"That's... nice ;)":number<36?"OKAY COWBOY":"WOW. Send tips"; Your PP is ${number}. ${message} )

Yet, no chance

DNS are fine, have SSL activated, can't see the problem. I cant find anything wrong on my PHP code or server, also we tried another urlfetch with another php from another example and that worked fine

1 reply

Typically when this occurs there's something wrong with your server or firewall config. You can simulate a request from Nightbot using command line with curl.

curl https://freedomainwhatever…/ppsize.php -H 'User-Agent: Nightbot-URL-Fetcher/0.0.3'