[mapserver-users] Workaround for image caching problems in php_mapscript
Tim Sutton
sutton_t at giug.net
Wed Oct 31 07:18:43 PST 2001
Hi
I have made a small work around for the problem of images being named
in a non-unique way:
$url = $img->saveWebImage($gAppletImgFmt, 0, 0, -1);
//added by Tim to ensure images have unique names
mt_srand((double) microtime() * 1000000);
$randval = mt_rand();
$uniqueURL = substr($url,0,-4).$randval.".png";
rename ("/tmp/$url", "/tmp/$uniqueURL");
$url=$uniqueURL;
//end of changes by Tim
I hope that proves useful to anyone else encountering the same problem
:-)
Tim
More information about the MapServer-users
mailing list