Real time updating webstie

Hello,

I need to build a website that updates in real time, but I do not know what the best way to implement a solution that will allow me to do this. I have a program which constantly checks for new pricing data from an exchange and then writes this data to a mysql table. I would like to build a website which will display this data and be up to date. Ideally any new data would be ‘pushed’ and immediately reflected on the website but I would also settle for a slightly less ideal solution if it’s significantly easier to implement. Can anyone suggest how I should go about solving this problem and what tools (php, javascript, …) would be best applicable for each part?

Thanks,

Max

If the data is already in a MySQL database, I suggest using php to do this. There are tons of php tutorials explaining how to access data from a mysql db table. Good luck.

Is a webstie a bit like a pastie?

As j3ph said PHP is the solution. You will need to retrieve this values from the database for each page request. Each page load the latest values stored in the database will be displayed.

For values to update without a page refresh you will need to look into the use of AJAX.

Depending on how many of these you are doing, each time you update the database you could write a text file with the values in it which need to surface onto the website page.

price.html


<h3>Price<h3>
<p>&#163; 124.45</p>

Use ajax to poll that text file every say, minute.

If JS is turned off just write a “refresh now” link on the page.

Off Topic:

Sorry about the daft pastie comment btw, yes on the pop again last night, tsk …