I wonder how I can load and show a news text from an external server, so I can show actual info inside a game by just updating the news text on the server and not have to upload a new game version?
How can this be done?
I wonder how I can load and show a news text from an external server, so I can show actual info inside a game by just updating the news text on the server and not have to upload a new game version?
How can this be done?
There are quite a few ways of doing this and what the easiest solution is probably depends on your personal experience and skills.
You could do LAMP stack, or just use simple PHP or JavaScript functions, or push notifications as well, I guess.
The simplest you could get away with would be to create a function in your app that checks a PHP file on your server for if there are news available. If you plan to just show one message at a time, that you’d manually change if and when needed, then you could simply run file_get_contents() to load your message from another file on your server and return that to the app.
You could just put a text file on a web server you have access to and use network.download() to fetch it. You would have to have a way to push the news file to the server (maybe just use FTP) and be able to delete it when the news is no longer relevant.
Or you could potentially go all out and create an administrative portal, with PHP/HTML/CSS on a web server like XeduR is talking about to present you (or who ever’s posting the news) with a web form, to enter the message and save it to your web server.
You could even setup a Wordpress server on a web host, use Wordpress to write blog posts and use Wordpress’s RSS feed to make multiple posts available.
It’s all up to your imagination.
Rob
Thank you for all your fast help on this! Much appreciated!