I run a fishing website and one of the things my visitors use are tide reports. I get my data from NOAA via the following code:
<?php
$url = '
$lines_array = file($url);
$lines_string = implode('', $lines_array);
eregi("<pre>(.*)</pre>", $lines_string, $head);
echo $head[0];
?>
The data is displayed in a web page at , however, this method is not practical. I would like to extract the data and insert it into mysql so that I can display the current days tides as well as the next 4 days, rather than the entire year all on one page. (slow loading, hard to read, etc.)
As you can see by the output, the data is displayed by months and is preformated (from originating URL) .
I am learning more and more on php but I'm not quite sure where to start on this one and was hoping someone could steer me in the right direction. Thanks for any info or help.
<?php
$url = '
$lines_array = file($url);
$lines_string = implode('', $lines_array);
eregi("<pre>(.*)</pre>", $lines_string, $head);
echo $head[0];
?>
The data is displayed in a web page at , however, this method is not practical. I would like to extract the data and insert it into mysql so that I can display the current days tides as well as the next 4 days, rather than the entire year all on one page. (slow loading, hard to read, etc.)
As you can see by the output, the data is displayed by months and is preformated (from originating URL) .
I am learning more and more on php but I'm not quite sure where to start on this one and was hoping someone could steer me in the right direction. Thanks for any info or help.