FakeImages
Table of Contents
- image() : mixed
- Download a remote random image to disk and return its location
- imageFromLocal() : string
- Try to get an image from local
- imageUrl() : string
- Generate the URL that will return a random image
Methods
image()
Download a remote random image to disk and return its location
public
image([mixed $url = null ][, mixed $dir = null ][, mixed $width = 640 ][, mixed $height = 480 ][, mixed $category = null ][, mixed $fullPath = true ][, mixed $randomize = true ][, mixed $word = null ][, mixed $gray = false ]) : mixed
Requires curl, or allow_url_fopen to be on in php.ini.
Parameters
- $url : mixed = null
- $dir : mixed = null
- $width : mixed = 640
- $height : mixed = 480
- $category : mixed = null
- $fullPath : mixed = true
- $randomize : mixed = true
- $word : mixed = null
- $gray : mixed = false
Tags
Return values
mixed —imageFromLocal()
Try to get an image from local
public
imageFromLocal() : string
Return values
string —imageUrl()
Generate the URL that will return a random image
public
imageUrl([int $width = 640 ][, int $height = 480 ][, string|null $category = null ][, bool $randomize = true ][, string|null $word = null ][, bool $gray = false ]) : string
Set randomize to false to remove the random GET parameter at the end of the url.
Parameters
- $width : int = 640
- $height : int = 480
- $category : string|null = null
- $randomize : bool = true
- $word : string|null = null
- $gray : bool = false