File: example/clock.php

Recommend this page to a friend!
  Classes of Tomas Pavlatka  >  PTX PHP GD Analog Clock  >  example/clock.php  >  Download  
File: example/clock.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PTX PHP GD Analog Clock
Render the time on analog clock as an image
Author: By
Last change:
Date: 5 years ago
Size: 374 bytes
 

Contents

Download
<?php

require_once '../vendor/autoload.php';

try {
   
$time = isset($_GET['time']) ? $_GET['time'] : null;

   
$params = array(
       
'canvas' => array(
           
'font' => '../fonts/instruction/instruction.ttf'));
   
$clock = new PTX\Clock($time);
   
$clock->draw($params);
   
$clock->to_browser();
} catch(\
PTX\ClockException $e) {
    echo
$e->getMessage();
}


For more information send a message to info at phpclasses dot org.