[Phpfreechat-svn] SF.net SVN: phpfreechat: [469] trunk/admin/version.class.php
Status: Beta
Brought to you by:
kerphi
From: <ne...@us...> - 2006-04-25 07:30:24
|
Revision: 469 Author: nemako Date: 2006-04-25 00:30:18 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=469&view=rev Log Message: ----------- + Change the test in the version.class.php file to detect if the www.pfc.net/version file is reachable Modified Paths: -------------- trunk/admin/version.class.php Modified: trunk/admin/version.class.php =================================================================== --- trunk/admin/version.class.php 2006-04-24 15:33:52 UTC (rev 468) +++ trunk/admin/version.class.php 2006-04-25 07:30:18 UTC (rev 469) @@ -31,14 +31,18 @@ * @return integer version */ function getPFCOfficialCurrentVersion(){ - if (file_exists($this->pfc_official_current_version)) { + $parse = parse_url($this->pfc_official_current_version); + $host = $parse['host']; + error_reporting(0); // It's maybe not the best thing to do... + if (!fsockopen ($host, 80, $errno, $errstr, 1)) { + return 0; + } + else{ $fp = fopen($this->pfc_official_current_version,"r"); $version = trim(fgets($fp)); fclose($fp); return $version; } - else - return 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |