<?php
/**
 * 2006 by Michal Pena (Cyb.org)
 * Licence: public domain
 */

if($_GET['date'] != '')
{
    echo 
'UNIX timestamp: '.strtotime(str_replace('.''-'$_GET['date'])).'<br>
Date: '
.date('Y-m-d H:i:s'strtotime(str_replace('.''-'$_GET['date']))).'<br>'."\n";
}
if(
$_GET['timestamp'] != '')
{
    echo 
'UNIX timestamp: '.$_GET['timestamp'].'<br>
Date: '
.date('Y-m-d H:i:s'$_GET['timestamp']).'<br>'."\n";
}
?>
<br>
<form>
Date: <input type="text" name="date"> f.e. now, 2006-05-02<br>
Timestamp: <input type="text" name="timestamp"> f.e. 1146520800<br>
<input type="submit">
</form>

<p align="center"><a href="<?php echo $_SERVER['PHP_SELF']; ?>s">source</a></p>