Location: PHPKode > projects > PHPSiteStats > phpsitestats/update.php
<?php include("inc.header.php"); ?>

<?php

        $msg = '';

	if (ini_get('allow_url_fopen') == 0){
		$msg .= "<img src=gfx/ico_warn.gif> This server does not allow accesing of remote files from php.<br>";
	}else{
		$available = file ('http://phpsitestats.sourceforge.net/version.txt');
	}
	$installed = $cfg_version;
	if (!$available){
		$msg .= "<img src=gfx/ico_warn.gif> Coud not get new version number";
		$disabled = "disabled";
		}else{
		if ($installed==rtrim($available[0])) {
		$msg .= "<img src=gfx/ico_warn.gif> Installed version of PHPSiteStats is the latest one,you don't need to update.";
		$disabled = "disabled";
		}else{
		$msg .= "<img src=gfx/ico_yes.gif> New version of PHPSiteStats is available!";
		$disabled = "";
		}
	}

?>

<form action='http://phpsitestats.sourceforge.net' method='post'>
        <?php echo "<p>&nbsp;$msg</p>"; ?>
	<table>
	<th width='150'><b>Installed version:<b></th>
	<th width='150'><b>Available version:<b></th>
                <tr>
		<td><?php echo $installed ?></td>
                <td><?php echo $available[0] ?></td>
                </tr>
		<tr><td><p>&nbsp;</p></td></tr>
		<tr>
                        <td colspan="2" align="center"><input class=input type='submit' name='submit' value='Get new version !' <?php echo $disabled ?> >
		</tr>
        </table>
</form>
<br><br>

</center>
</body>
</html>
Return current item: PHPSiteStats