LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2006, 06:23 PM   #1
Armon
Member
 
Registered: Feb 2005
Distribution: Ubuntu- Dapper Drake and Mac OS X 10.4
Posts: 46

Rep: Reputation: 15
need to get data from xml file to MySQL database, and then use php to access


Hey, on this one game, there is a stockmarket. The data is uploaded into a XML file that is updated every 5 minutes. http://www.gewar.net/war/resources/xml/stockmarket.xml
From here I want to put it into a MySQL database. Hang on, then, I need to write a PHP script to take that data and create line graphs displaying the stock progess over a hour, day, and week. Which would be displayed in a webpage. I am not a complete newb, but please don't throw too many complex terms at me. I know its a lot, but thanks.
 
Old 01-18-2006, 02:54 PM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
Obviously, this isn't something where you can post a question and someone will be able to post scripts for what you need. That said, you'll be reading quite a bit, as you'll need to familiarize yourself with PHP and Mysql. PHP will be doing most of the work, so you'll need to learn how to connect to web pages and extract information from those pages, then reformat and insert that information into Mysql. After you've got that figured out, then it should be a relatively easy matter to essentially do that in reverse, to extract the information from mysql, and format it to display properly on your web server. For this, obviously, you should have a small bit of knowledge of apache, to set access permisssions and directory related items.

Alternatively, depending on what you need the data for, or how long you're storing the data, you might even be able to dispense with the mysql data, and instead just use a flat-file format to store the information. Obviously, this works better with smaller amounts of information (distrowatch.com uses flat files in this manner, so "small" is relative), or if you need to use the information in a lot of different ways (php might not have hooks for some programs, whereas mysql is fairly accessible by most, using various standard linking methods, but this is mostly if you need to expand your usage of this stuff in the future). And all these factors contribute to why someone can't just post an easy solution that would work for you.

Hope these links help get you started, and if you need more clarification on more detailed aspects of items you don't understand after reading this information, LQ's programming forum is a great place to get more help.

http://www.w3schools.com/php/default.asp
http://www.php-mysql-tutorial.com/
http://www.php.net/docs.php
http://dev.mysql.com/doc/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Paging data from XML with PHP Boby Programming 1 03-23-2005 09:57 AM
onverting database rrelational data into xml using java anirudh Programming 0 03-23-2005 07:05 AM
experiences with embedded mysql? XML instead of a database? SerfurJ Programming 2 12-11-2004 08:06 AM
GuardDog not able to open the protocol database xml file Diode Linux - Software 1 04-20-2004 08:04 AM
MySQL: Importing a database from an XML file concoran General 0 09-08-2003 02:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration