// First create the "cache" directory to write the file function BZ_cache ($ url, $ cacheName) {global $ cache; global $ QUERY_STRING; // here you can name $ filename = "cache/" according to your habits /". $ cacheName. ",". $ QUERY_STRING. ". html "; // here you should also test the file time to see if it has expired // (but this is not done here. Haha! Complete it by yourself !) If (file_exists ($ filename) {readfile ($ filename); return 1; // OK iv send the html page} else {if (! Isset ($ cache) {$ fcontents = join (, file ($ url ."? ". $ QUERY_STRING. "& cache = t"); $ fp = fopen ($ filename, "w"); fwrite ($ fp, $ fcontents); fclose ($ fp); return 0; /// iv to execute the file }}// put the following line of code at the beginning of your php file // if (BZ_cache ("complete url without params ", "AN_IDENTIFIER") exit (); // remember, this URL must be complete, that is, there must be http ://. However, this parameter is not followed. // There is an example online: http://azerclic.labynet.org/doc.php3 // The first line is // if (BZ_cache ("http://azerclic.labynet.org/doc.php3", "doc") exit (); // you will see the cached file in http://azerclic.labynet.org/cache/ // Thats all // good luck! // I guess there is no problem in WIN32. I still need to consider permission issues in LINUX, because generally there is no write permission.