CVS: phpweather data_retrieval.php,1.30,1.31
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2003-07-01 09:34:57
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv10186 Modified Files: data_retrieval.php Log Message: Added PhpDoc comments to get_metar_file() and get_metar_socket(). Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- data_retrieval.php 29 Oct 2002 08:52:43 -0000 1.30 +++ data_retrieval.php 1 Jul 2003 09:34:54 -0000 1.31 @@ -128,7 +128,18 @@ } } - + /** + * Retrieves a METAR report using fsockopen(). + * + * The communication with the proxy (if one is needed) and the NWS + * is done using fsockopen(). This should be used when the file() + * function is disabled. + * + * @access private + * @param string The ICAO for which the report will be fetched. + * @return array The raw METAR report line by line in an array. + * @see get_metar_file() + */ function get_metar_socket($icao) { $host = 'weather.noaa.gov'; $location = "/pub/data/observations/metar/stations/$icao.TXT"; @@ -178,6 +189,18 @@ } + /** + * Retrieves a METAR report using file(). + * + * The communication with the NWS is done using file(). This should + * only be used when a direct connection to the NWS can be + * established, the proxy settings isn't used with file(). + * + * @access private + * @param string The ICAO for which the report will be fetched. + * @return array The raw METAR report line by line in an array. + * @see get_metar_socket() + */ function get_metar_file($icao) { $host = 'weather.noaa.gov'; $location = "/pub/data/observations/metar/stations/$icao.TXT"; |