File: canvas.php

Recommend this page to a friend!
  Classes of Tomas Pavlatka  >  PTX PHP GD Analog Clock  >  canvas.php  >  Download  
File: canvas.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: 267 bytes
 

Contents

Download
<?php

require_once './vendor/autoload.php';

try {
   
$clock = new PTX\ClockCanvas();
   
$clock->draw();
   
$file_path = './cache/base.png';
   
$clock->to_file($file_path);
   
$clock->to_browser();
} catch(\
PTX\ClockException $e) {
    echo
$e->getMessage();
}


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