Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Igor Shevchuk  >  text2timestamp  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Exampl
Class: text2timestamp
Parses and extract times from text
Author: By
Last change:
Date: 3 years ago
Size: 613 bytes
 

Contents

Class file image Download
<?php
 
if (isset($_POST['get'])){
    include(
"text2timestamp.php"); 
    
$time_ = new text2timestamp($_POST['time']);
    
    if (
$time_->is_error_message()){
        echo 
$time_->get_error_message();
    }
    else{
        
$time=$time_->get_timestamp();
        
$action=$time_->get_action(); 
        echo 
date('H:i:s Y/m/d',$time).' - '.$time.' - '.$action.'<br/>';     
    }
 }
 else{
     
?>
        <form method="post">
            Tell time
            <input type="text" name="time">
            <input type="submit" name="get" value="get time"> 
        </form>
     <?php
 
}
?>