views:

52

answers:

2

This should be a code igniter based class,

The table header should be

Price Percent_change Company Name Company Code Volume

Please help any one knows?

Many thanks!

A: 

In your codeigniter class, you should call the file_get_contents function with specified url:

$contents = file_get_contents('url here');

Now you have data of specified url in $contents variable that you can manipulate as you like.

Sarfraz
thank you for your help! but i dont know how I can extract the data and save into the database.. any idea Mr. SArfraz?
devzone
A: 

You just need to parse the file and insert it into a database. A quick look at the link shows that it seems to be all separated by semi-colons. Take a look at explode()

To get your results, simply do

$splitContents = explode($rawContents);
$counter=0
while($counter <= count($splitContents)) {
    $Price=$splitContents[$counter++]
    $Percent_change=$splitContents[$counter++]
    $Company_Name=$splitContents[$counter++]
    $Company_Code=$splitContents[$counter++]
    $Volume=$splitContents[$counter++]
    mysql_query("INSERT INTO ....");
}
TheLQ
Hmm, why the down vote?
TheLQ