Thanks for all your help, I made some changes, but now it only insert a blank record. No data. I read the function explode on php.net, what am I missing?
$file = "http://www.ndbc.noaa.gov/data/5day2/44004_5day.txt";
$fp = fopen($file, "r");
$data = fread($fp, filesize($file));
fclose($fp);
$output = explode(" ", $output);
foreach($output as $var) {
$Year = $Year;
$Month = $Month;
$Day = $Day;
$Hour = $Hour;
$Min = $Min;
$WindDir = $WindDir;
$WindSpeed = $WindSpeed;
$Gust = $Gust;
$WaveHT = $WaveHT;
$DPD = $DPD;
$APD = $APD;
$MWD = $MWD;
$Press = $Press;
$Atemp = $Atemp;
$Wtemp = $Wtemp;
$Dewp = $Dewp;
$Vis = $Vis;
$ptdy = $ptdy;
$Tide = $Tide;
$tmp = explode(" ", $var);
foreach ($output as $newrow)
mysql_query("INSERT INTO buoy44 (Year,Month,Day,Hour,Min,WindDir,WindSpeed,Gust,WaveHT,DPD,APD,MWD,Press,Atemp,Wtemp,Dewp,Vis,ptdy,Tide) VALUES('$Year','$Month','$Day','$Hour','$Min','$WindDir','$WindSpeed','$Gust','$WaveHT','$DPD','$APD','$MWD','$Press','$Atemp','$Wtemp','$Dewp','$Vis','$ptdy','$Tide')") or die("Insert failed: " . mysql_error());
}