Solved

Archiving a share feed

Posted on 2001-08-02
4
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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.

739 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