Generates placeholder images in the style of billboards from John Carpenter's movie They Live.
- GD with FreeType, JPEG and PNG libraries
$ composer install
$ php -S 0.0.0.0:3000 index.php
http://localhost:3000/{width}x{height}.{format}?text={text}
width
: Width of the image.height
(optional): If omitted, a squared image will be created based on the specified width.format
(optional):png
(default),gif
orjpg
are valid formats.text
(optional): If no text is specified, random slogans from the movie are used.
- http://localhost:3000/300
- http://localhost:3000/300x600
- http://localhost:3000/900x1200.png
- http://localhost:3000/900x1200.jpg
- http://localhost:3000/900x1200.jpeg
- http://localhost:3000/500.jpg
- http://localhost:3000/500.jpg?text=Hello%20World
- http://localhost:3000/500x700.jpg?text=Hello%20World
In order to use this script with an Apache server use a .htaccess
file to redirect all requests to index.php
.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Licensed under the MIT License.