1
0
mirror of https://github.com/php/web-php.git synced 2026-03-26 00:02:12 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
Stewart Lord
dd5d429188 Replace __DIR__ with dirname(__FILE__). It's easy to forget that this
constant was only added in 5.3 (some mirrors run old versions).
2011-09-22 06:11:35 +00:00
Stewart Lord
86c75aca35 Made elephpant image banner dynamic.
Elephpant images are pulled from flickr via the php-master server hourly.
The web site now provides a simple PHP script to serve a random sampling
of these images in JSON format.

The web browser now loads the elephpant images via JavaScript, requesting
only the number of images that are required to fill the viewport. Images
are inserted into the page using the data URI scheme. This ensures that 
only one http request is needed to load all of the required images.

If the browser window resizes, the JavaScript will fetch additional images
as required to fill out the viewport again. There is a slight delay built
in (250ms) to avoid excessive requests while the window is being resized.

Some browsers (e.g. older versions of MSIE) do not support the data URI
scheme. For these browsers we may wish to provide a fallback mechanism of
aggregating the images (e.g. MHTML, aka MIME HTML).

If the images fail to load, the elephant banner is hidden automatically.
2011-09-21 04:33:01 +00:00