Forum Moderators: open

Message Too Old, No Replies

Dynamic php and Mysql application questions.

Need advise!

         

scany

12:00 am on Jan 19, 2007 (gmt 0)

10+ Year Member



Hi,

Please can anyone point me in the right direction for some dynamic contents I plan to build for my website.

Basically, I'm hoping to run some dynamic web charts that will allow my visitors to analysis currency movements and other statistical information in the forex market.

I need the charts to be updated every 5 mins with dates, times, open, close, high and low prices for the last 30 days.

Ok, now the questions:-

1, What is the best way to get this information in to Mysql database?
I think I can get xml data feeds, or API data feeds (maybe). What's the difference, and which is better suited for what I have in mind?
Or is there a better way?

2, Ok, lets now assume I have the feeds working and the database is updated as required.
Can pull the contents from Mysql using php scripts, it this the best way to do it?

3, Do I run a CRON job so that the charts are updated every five minutes, is there another way to do this?

4, Do I need to be aware of anything, or can you think of a different approach?

Thank you in advance.

Clive

eelixduppy

3:45 pm on Jan 19, 2007 (gmt 0)



Welcome to WebmasterWorld!

1, What is the best way to get this information in to Mysql database?
I think I can get xml data feeds, or API data feeds (maybe). What's the difference, and which is better suited for what I have in mind?
Or is there a better way?

Whichever is best for you. xml would work nicely.


2, Ok, lets now assume I have the feeds working and the database is updated as required.
Can pull the contents from Mysql using php scripts, it this the best way to do it?

PHP is a very good way to pull the contents from the database. There's a great thread in the php forum's library about The basics on extracting data from mysql [webmasterworld.com] which will definitely interest you.

3, Do I run a CRON job so that the charts are updated every five minutes, is there another way to do this?

Yes, this is generally how this is accomplished.

Best of luck! :)

scany

6:02 pm on Jan 20, 2007 (gmt 0)

10+ Year Member



Hi eelixduppy,

Thank you for that reply, I feel a lot more confident to go with this
approach.

Just one other question I have is what if I wanted the charts to be updated in real time (streaming), will an API feed allow me to do this, if not what are my other options?

Once again thanks