drexnefex Posted January 2, 2007 Share Posted January 2, 2007 Hello - I have a script that was running fine a few days ago and now it's broken. I haven't touched the script in quite a while and am stumped as to what could have caused it to break. I contacted my ISP to see if anything on their end has changed...they said no.This script contacts a NOAA server, parses a text file and spits out a table.file is here: http://www.nwbroweather.com/working/testbuoy4.phpIm getting an error on line 179. this is line 179--> stream_set_timeout($fpread, 3);File is attached.Im running PHP 4.4.4[attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
taith Posted January 2, 2007 Share Posted January 2, 2007 whats the error? Quote Link to comment Share on other sites More sharing options...
drexnefex Posted January 2, 2007 Author Share Posted January 2, 2007 the error is this: Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /xxxxxxxxx/working/testbuoy4.php on line 179 Quote Link to comment Share on other sites More sharing options...
drexnefex Posted January 2, 2007 Author Share Posted January 2, 2007 in checking my server error logs i also got this error roughly when the script stopped functioning properly.[31-Dec-2006 01:23:45] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.ndbc.noaa.gov:80 in /home/nwbrowea/public_html/weather/testbuoy4.php on line 169could this have something to do with the date changing to 2007? Quote Link to comment Share on other sites More sharing options...
taith Posted January 2, 2007 Share Posted January 2, 2007 more then likely... heres your problem... .gov files are usually protected servers... are you sure you have privilages to connect to that?[code] $backend = "http://www.ndbc.noaa.gov/data/realtime2/".$buoy[$counter].".txt";[/code] Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 2, 2007 Share Posted January 2, 2007 Sounds like the problem is on their end. If it suddenly stopped being able to connect...maybe you should contact them? Quote Link to comment Share on other sites More sharing options...
drexnefex Posted January 2, 2007 Author Share Posted January 2, 2007 the files are public domain and are readily available for public use.the files are located here: http://www.ndbc.noaa.gov/data/realtime2/This page is where i got my script from. there's an example of the output in the 'Current Santa Barbara Buoy Reports From The NDBC' section. this script is looking at the same gov server. why would that work and mine not? http://www.surfimplement.com/ Quote Link to comment Share on other sites More sharing options...
drexnefex Posted January 2, 2007 Author Share Posted January 2, 2007 bump.Any other ideas out there? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.