mrausch Posted January 14, 2010 Share Posted January 14, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/188501-real-time-updating-website-with-data-from-server/ Share on other sites More sharing options...
lemmin Posted January 14, 2010 Share Posted January 14, 2010 If your MySQL tables are automatically being updated, all the work in making it dynamic is done! All you have to do is create a script (in PHP) that queries your database for the information. Any time that information is changed by your program that writes to your database, those changes will be reflected on the web page. Quote Link to comment https://forums.phpfreaks.com/topic/188501-real-time-updating-website-with-data-from-server/#findComment-995154 Share on other sites More sharing options...
Lamez Posted January 14, 2010 Share Posted January 14, 2010 One word: AJAX. I bet you can find some sorta pre-made script that watches the DB and 'pushes' the new info when it is added\changed. Quote Link to comment https://forums.phpfreaks.com/topic/188501-real-time-updating-website-with-data-from-server/#findComment-995156 Share on other sites More sharing options...
waynew Posted January 14, 2010 Share Posted January 14, 2010 Obviously this "scraping" of pricing data is being carried out by a cron job, or something along those lines. Simply implement the scraper script before the results are taken out of your database. Quote Link to comment https://forums.phpfreaks.com/topic/188501-real-time-updating-website-with-data-from-server/#findComment-995157 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.