Solved

Archiving a share feed

Posted on 2001-08-02
4
198 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

815 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

10 Experts available now in Live!

Get 1:1 Help Now