Error connecting Server - Twitch commands

Website URL

https://ttvcommands.free.nf/
Error is not on the website, its on Twitch because won’t connect to the server

Error Message

We only get Error Connecting To Remote Server

Other Information

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://url/file.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

That does not look like PHP to me, can you share the entire file?

2 Likes

Sure! This is the PHP code, its just a basic random number and a text


<?php
$number = rand(1, 40);
if($number < 9){
    $text = "Is it cold there?";
}elseif($number < 15){
    $text = "its growing up";
}elseif($number < 26){
    $text = "thats.. nice;)";
}elseif($number < 36){
    $text = "OKAY COWBOY";
}else{
    $text = "WOW. send tips";
}
echo "Your PP is $number. $text";
?>

The PHP is running on the file.php
located here https://ttvcommands.free.nf/commands/ppsize.php if you want to check if it works

We also tried to change to java but didnt worked, we would rather using PHP since i have ready more random games

I think Nightbot can’t connect to your website because of this security system:

7 Likes

I misunderstood where the error message was coming from, I thought Nightbot was some software you had on the IF server.

The article @JxstErg1 shared is probably the issue.

Also, PHP and SQL are the only backend languages support here, so Java won’t work

6 Likes

ty for the link! for what i see, only the premium accounts will let me disable it

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