Location: PHPKode > scripts > Hits Counter > hits-counter/hitscountertest.php
<?php
/* Include req'd file */
require_once('hitscounter.php');

/* Set us up the bomb, neh. */
$myfile = new HitsCounter('justafile.txt');
$otherfile = new HitsCounter('justafile.txt');
?>
<html>
<head>
<title>hitscounter test</title>
</head>
<body>
<h1>hitscounter test</h1>
<p> Link with counter:
<?php $myfile->printdownloadlink('Insane long text file', true); ?>
<p> Link without counter:
<?php $myfile->printdownloadlink('Insane long text file', false); ?>
<p> Link with no title (but has counter):
<?php $myfile->printdownloadlink('', true); ?>
<p> Just the count:
<?php $myfile->printcount(); ?>
<p>With download resume:
<?php $otherfile->printdownloadlink('', true, true); ?>
</body>
</html>
Return current item: Hits Counter