Solved

Archiving a share feed

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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.

863 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

25 Experts available now in Live!

Get 1:1 Help Now