Solved

Archiving a share feed

Posted on 2001-08-02
4
194 Views
Last Modified: 2006-11-17
I have been given the job of incorporating a share feed into our web site and have decided to use PHP and MySQL for the job. I am pretty new to PHP so it is going to be a tough one for me...
I can sort out the basics of just displaying the feed on the page but am having difficulty working out how I am going to archive the material on a daily basis. I need to log the information so that it can be used to generate graphs on the fly of the indices and share prices of the companies involved. What should I be looking at to make this happen?
Any offers gratefully received (and rewarded!)
0
Comment
Question by:tomhayes
  • 3
4 Comments
 
LVL 3

Expert Comment

by:izwiz
ID: 6345744
Well, if you have a MySQL database then you're off to a start.

I'm assuming from your question that you are getting the feed live from a different website at the moment?

So basically you are including the feed via http:// or something and simply displaying it.

What I would do personally, since you'll want to ensure you are grabbing this material at specified times, is use a cron job (every minute or something) to pull down the info and stick it in a mysql table.

You can then use php to report on historical data.
0
 

Author Comment

by:tomhayes
ID: 6345800
Thanks for this - the points will be yours if you can help me on one more issue.
I am using a MySQL database and the information is coming directly from the stockbrokers so we have to grab the info every few minutes.
The real question comes down to the historical data... how do I make it 'historical' i.e. archive it... should I timestamp it? What's the process?
0
 
LVL 3

Accepted Solution

by:
izwiz earned 100 total points
ID: 6346138
Yeah, that's exactly it.  Simply timestamp it when you grab it into the database.  That way you can display the last data very simply, then pull historical data out by date/time ranges.

0
 
LVL 3

Expert Comment

by:izwiz
ID: 6347867
Cheers mate,

izwiz.
0

Featured Post

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now