Pregunta

I want give access to share some small (~5kB) webpage featuring changing predictions generated every few seconds based on ongoing measurements and analysis. This runs for a few hours a couple of times a week during the games of interest - available to my small group of enthusiastic followers.

Currently, I upload the whole static HTML-only web page on a public shared webserver with a Perl FTP program every 30s. However, sometimes the FTP program fails and the page stops updating. I could trap that error and retry a while later, I suppose.

Earlier, I hosted the PHP page on my PC and users could use the dynDNS address - but I felt the security risk was too much - so this is blocked. It is that pages' HTML that is uploaded - a quick and dirty solution.

I know it is clumsy and inefficient, but does (I think) have the advantage that the data is pushed from my PC rather than being pulled by the public webserver - so my PC remains hopefully secure and invisible (no ports open), and no connection details are stored on the server or no need to expose the underlying database to the webserver. It's also on my LAN.

How to do something like this?

¿Fue útil?

Solución

It depends from what type of solution You want. If You still want to keep script generating data on Your local machine:

You can write PHP script with simple API and host it on the server.

  • From Your local machine You will have to only send HTTP requests with results.

  • Server will be rendering HTML page with the most actual data and accepting requests with fresh data.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top