Jump to content

Why is this happening? 'Warning: stream_set_timeout():'


drexnefex

Recommended Posts

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.php

Im 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]
Link to comment
Share on other sites

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 169

could this have something to do with the date changing to 2007?
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.