Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Archiving a share feed

Posted on 2001-08-02
4
Medium Priority
?
206 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 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

886 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