Sample> Simple Cache

<?php

// include TPLN
include('TPLN/TPLN.php');

$TPLN = new TPLN;

// every five minutes file cached is created
if(!$TPLN->open('simple_cache.html','CACHED'30))
{
    echo 
"Create cached file<br>";
    
$TPLN->parse('time',date('H:i:s'));
}

$TPLN->write();

?>
<html>
<head>
    <title>TPLN - Cache Sample</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h1>The file cached is created every 30 seconds</h1>

The time was <b>{time}</b> when the file was cached<br>
<br>
<input name="reload" type="button" value="Reload" onClick="history.go(0);" />

<br>
<br>
{_Logo}<font size="1"> in {_Chrono} s<br>
Queries executed: {_QueryCount}</font>


</body>
</html>