https://github.com/fabsrc/they-live-placeholder
:sunglasses: Generates placeholder images in the style of billboards from John Carpenter's movie 'They Live'.
https://github.com/fabsrc/they-live-placeholder
placeholder-image they-live
Last synced: 9 months ago
JSON representation
:sunglasses: Generates placeholder images in the style of billboards from John Carpenter's movie 'They Live'.
- Host: GitHub
- URL: https://github.com/fabsrc/they-live-placeholder
- Owner: fabsrc
- Created: 2016-11-05T20:32:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-22T19:14:58.000Z (almost 9 years ago)
- Last Synced: 2025-02-20T14:11:17.738Z (over 1 year ago)
- Topics: placeholder-image, they-live
- Language: PHP
- Homepage:
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# They Live Placeholder
> 
Generates placeholder images in the style of billboards from John Carpenter's movie [*They Live*](https://www.youtube.com/watch?v=JI8AMRbqY6w).
## Requirements
* [GD](https://libgd.github.io/) with FreeType, JPEG and PNG libraries
## Install
```bash
$ composer install
```
## Start
```bash
$ php -S 0.0.0.0:3000 index.php
```
## Usage
```
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` or `jpg` are valid formats.
* `text` *(optional)*: If no text is specified, random slogans from the movie are used.
### Examples
* 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
#### Example Image
> http://localhost:3000/600x400

### Use with Apache
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]
```
## License
Licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).