note 39548 deleted from function.rand by aidan
| From: | aidan@php.net | Date: | Sat, 11 Sep 2004 07:39:51 +0000 |
| Subject: | note 39548 deleted from function.rand by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76445@lists.php.net to get a copy of this message | ||
Note Submitter: tempest at bloggernaut dot com
----
In response to the image caching code... heres a more efficent way to call that.
<?php
function preventImgCache($path)
{
$md5 = "";
for($i=0;$i<5;$i++) $md5 = md5($md5 . rand(500, 2000));
return "<img src=\"".$path."?".$md5."\">";
}
echo preventImgCache("image.jpg");
?>