2017 © Pedro Peláez
 

library emailcountdown

Email Countdown class to generate GIF

image

marbie77/emailcountdown

Email Countdown class to generate GIF

  • Saturday, January 20, 2018
  • by marbie77
  • Repository
  • 2 Watchers
  • 2 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

EmailCountdown

Just some simple PHP classes to generate a countdown (60 seconds GIF animation) to be used as fake counter in an email, (*1)

The image itself works with Outlook, but it shows only the first frame of the GIF animation., (*2)

Installation

Use Composer to install it, (*3)

composer require marbie77/emailcountdown

Usage

Create the class, use the options and output the GIF., (*4)

$emailCountdown = (new EmailCountdown\CircleCountdown())->setDestinationTime(! empty($_GET['dest_time']) ? $_GET['dest_time'] : null)
    ->setTextColor(! empty($_GET['text_color']) ? $_GET['text_color'] : null)
    ->setBackgroundColor(! empty($_GET['background_color']) ? $_GET['background_color'] : null);

// content type gif
header('Content-Type: image/gif');
// no caching of gif, so it gets reloaded every time
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
echo $emailCountdown->getGIFAnimation();

Examples

To check the examples, first install dependencies with composer install, (*5)

Then navigate to example.php or example_wallpoet.php, (*6)

Changelog

2.1.1 * adding PR for removing deprecation messages from @simoheinonen, (*7)

2.1.0 * adding PR for setting max frames from @simoheinonen, (*8)

2.0.1 * adding new function to customize shown text and position * adding font Wallpoet-Regular to show additional example (example_wallpoet.php), (*9)

2.0.0 * added PHPDocs and new coding standards i.e. * removed all underscores from properties and methods * using camelCase now * includes PR from @igumenov - thank you!, (*10)

1.0.0 * Initial version, (*11)

The Versions

20/01 2018

dev-master

9999999-dev https://github.com/MarBie77/EmailCountdown

Email Countdown class to generate GIF

  Sources   Download

MIT

The Requires

 

by Martin Biermair

email countdown

27/07 2017

2.0.1

2.0.1.0 https://github.com/MarBie77/EmailCountdown

Email Countdown class to generate GIF

  Sources   Download

MIT

The Requires

 

by Martin Biermair

email countdown

28/10 2016

1.0.0

1.0.0.0 https://github.com/MarBie77/EmailCountdown

Email Countdown class to generate GIF

  Sources   Download

MIT

The Requires

 

by Martin Biermair

email countdown