Ask coding questions

← Back to all posts
Hosting
SaifAlhammouri

Hello, I would like to know if it’s possible to host my PHP script here, like is it possible to run my PHP script here and it would keep running 24/7? and if I upload any files here, would it stay here and get saved?

Also, is it possible to change the PHP version to 7.3?

Answered by SixBeeps [earned 5 cycles]
View Answer
Voters
weeklyd3
Comments
hotnewtop
SixBeeps

If you want to keep a server up and running at all times, I'd recommend UptimeRobot. All you need to do is create an account and set up a monitor to ping the server every 5-ish minutes.
Uploaded files should persist even after closing.
Changing the PHP version is something only the Repl team can really do. I'd suggest you post to the Feedback page about it.

SaifAlhammouri

@SixBeeps I want to do this to host my discord bot written with PHP, btw this bot can’t be ran in a website, it can only be ran in a CLI, so could you please tell me how to setup uptime robot with repl for my bot?

SixBeeps

@SaifAlhammouri If that's the case then I don't think you can use UTR.

SaifAlhammouri

@SixBeeps I think I got it figured out, now I have another question, is there a place in repl like a personal data base where I can store my bot token and in my PHP code, I can get the token I stored and run the bot?

btw, when I click on the button that opens a tab to the web server of my script, (the script just has an echo) it says "This site can’t be reached" and that it took too long to respond, why is that?

SixBeeps

@SaifAlhammouri For the first thing, read this.
I have no idea about the second thing, I don't use PHP.

SaifAlhammouri

@SixBeeps Thank you so much.