<?php 
// Unix Epoce  -> human time converter         
echo '<form name="form1" method="post" action="unixtime.php">'; 
$time=time(); 
$time2=date("r",$time); 
echo ' Current Time: '. $time .' - ' .$time2; 
echo '  <p>Unix TimeStamp';  
echo '    <input type="text" name="unix" size=10 maxlength="10" value="'.$unix.'">'; 
echo '    <input type="submit" name="Submit" value="Submit">'; 
echo '  </p>'; 
echo '  </form>'; 
If (isset($unix)) { 
     echo (date("r ",$unix)); 
                }; 

?>
Published in: PHP
Download

Related snippets