VickPix / KeepCalm-Generator

A simple php class using GD library to make simple KeepCalm style images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeepCalm Generator

A simple php class using GD library to make simple KeepCalm style images.

Simply use a '*' after a word if you want a new line.

Basic usage examples

Create a new KeepCalm image:

$kc = new KeepCalm("your text*here!");

Export image as a png file:

$kc->save();

Return image as stream (for example in a web page):

$kc->show();

Save file in the same directory of the script:

<?php
// Require the class with the correct path
require('keepcalm.class.php');

// Initialize
$kc = new KeepCalm("hello*world!");
// Output in a file
$kc->save();

Example output:

hello world


Embed image directly to your html output:

<?php
// Require the class with the correct path
require('keepcalm.class.php');

echo "Hey you!\n";

// Initialize
$kc = new KeepCalm("have a*nice day");
// Output in the page
$kc->show();

About

A simple php class using GD library to make simple KeepCalm style images.


Languages

Language:CSS 57.6%Language:HTML 29.6%Language:PHP 12.6%Language:JavaScript 0.3%