Random Fractal of the Day script
Hi, I've created a little PHP script that will return to you a random Fractal of the Day. You can see it in action on my fractals page: <https://user.xmission.com/~legalize/fractals/>. Every load of that page shows a different random Fractal of the Day, with appropriate links to the image, parameter file and FotD archive main page. The script is located at: <https://user.xmission.com/~legalize/fractals/fotd/random.php> The script can return a random FotD, or a specific FotD can be obtained with the '?id=N' parameter where N is the id associated with the entry. (The id may not be stable over time as new images are added, so be forewarned.) The id returned for a random result is embedded in an HTML comment. Example HTML result: <!-- https://user.xmission.com/~legalize/fractals/fotd/random.php?id=3370 --> <a href="https://user.xmission.com/~legalize/fractals/fotd/2008/11/2008.11.27-Outward_Bound.jpg"><img src="https://user.xmission.com/~legalize/fractals/fotd/2008/11/2008.11.27-Outward_Bound.thumb.jpg"></a><br/> <a href="https://user.xmission.com/~legalize/fractals/fotd/index.html">Fractal of the Day</a>, 2008.11.27<br/> Outward Bound (<a href="https://user.xmission.com/~legalize/fractals/fotd/2008/11/2008.11.27-Outward_Bound.par">parameter file</a>) The script can also return results as JSON by accessing 'random.php/json' or as markdown by accessing 'random.php/md'. The HTML output is the default and may be suitable for embedding in your web page as an <iframe>, but better results may be obtained by getting the JSON and using a little script to insert the elements as iframes are kinda hacky and messy. I created this to scratch my own itch, but maybe you find it useful too. -- Richard -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://ComputerGraphicsMuseum.org> Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
participants (1)
-
Richard