PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Dave Smith   PHP Convert Video to GIF   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Usage
Class: PHP Convert Video to GIF
Convert a video file to animated GIF with giflayer
Author: By
Last change:
Date: 9 years ago
Size: 776 bytes
 

Contents

Class file image Download
<?php
/*
example usage
gifLayer ver 1.0
*/

//disable time limit
set_time_limit(0);

//include gifLayer class
include('giflayer.class.php');

//Instantiate class with video url, start and end time in seconds
$gifLayer = new gifLayer('https://www.youtube.com/watch?v=feZKVnHXwv0',33,34);

//display html image tag for converted video
$gifLayer->displayImage();

/*
The following demonstrates the download and display from captured binary
of the converted video. To use, uncomment the captureGif method to capture
the binary and then uncomment either the downloadCapture or displayCapture
methods, depending on which you wish to preform.
*/

//$gifLayer->captureGif();

//$gifLayer->downloadCapture('test.gif');

//$gifLayer->displayCapture();
?>