streaming live data and fill mysql database

WannesNaf:
\That way I can take the data with php on my website and put it in in the database. I take a sample every 20 seconds.
...
I want to stream the data to a website (by example every second)

What is the best way to put that together?

So take a sample every second and send that to the web site via PHP. Every 20 requests, write one to the database.