Dynamic image creation at lorem-ipsum.co.uk
Share on Facebook

 

Below, is an image which shows your IP address. Therefore, it must have been generated on-the-fly. Generated images are useful for a number of things, such as creating anti-robot codes for web-forms. The code to do this sort of thing is very simple and self-explanatory. Save the code in a PHP file and then refer to that file in the <img tag of your HTML.

 

Your IP address, in an image at lorem-ipsum.co.uk

 

This example image retrieves your IP address and assigns it to a variable.

 

 

 

Image generation using a TrueType font

This adds a dash of creativity to your image - using a TrueType font which must be in the same folder as the PHP file you create. This example writes the text twice, once in grey and once in black, with a small off-set, to create a shadow effect.

TTF font image at lorem-ipsum.co.uk