Need help on how to test file.php not from localhost

hey there so im new to php and i’ve created a script and i need help to host it somewhere so ill be able to check if it works or not.
in my stream i have a command !x -[Xmassage]
and im building now a !y command that will do -[Ymassage] ,but it has to be triggered by !X first (so if someone did !Y with out !X been triggered it will result in !Z) but if !X triggered then it will “open” the option to use !Y and from there it will “open” multi options for my chat.
long story short-i’ve built the !Y command and the !Z respond but when ever im try to test if it’s work via localhost/file.php i keep getting error because !X command isn’t inside the file.php but its on nightbot already therefor my script cant find the !X trigger,so i want to know how can i “host”/upload my file.php somewhere and use $urlfetch so nightbot will/won’t be triggered by !X into twitch’s chat and “replay” to the trigger as well that going to be !Y and !Z.
thanks from advanced and sorry about my poor english ,have a nice day :slight_smile:

@CatFleX

A quick Google search will link you to lots of services that you can use to host your PHP scripts. The vast majority of them aren’t free, so my only warning would be that if you choose to use a free service, that service may inject some JavaScript whenever you load a page that executes one of your scripts. This will cause a $(urlfetch) to any one of your scripts to return a [Response must be less than 400 characters] error.

im well aware of that,and forgot to manttion that ive googled it for a decent amount of time,i just cant understand how to-because there is no such thing as “beginners freindly guide of how to host php” and as said above…i am new to php codding and doing it only for my stream and my chat’s entertaiment.
thanks for the respond tho

The general steps are: buy a domain and web hosting plan, login to your domain control panel, and upload your PHP scripts directly through the file manager or by using a file transfer client.

Here’s the first Google result I got for “a guide to web hosting”:

The hosting service used in that guide is Midphase, but note that there are lots of other options and that the steps for setting up hosting with other services are very similar.

1 Like

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