Hi,
I would like to do a Purge All of the LiteSpeed Cache for a site, that is all PHP and doesn't use a CMS of any type.
The server is ruuning cPanel if that makes any differents, I have looked at the purge by file PHP file in the misc folder.
I was wondering will the below clear all cache files for the domain name if I use this code:
I would like to do a Purge All of the LiteSpeed Cache for a site, that is all PHP and doesn't use a CMS of any type.
The server is ruuning cPanel if that makes any differents, I have looked at the purge by file PHP file in the misc folder.
I was wondering will the below clear all cache files for the domain name if I use this code:
PHP:
<?php
$fp = fsockopen('127.0.0.1', 80, $errno, $errstr, 2);
if (!$fp) {
echo "$errstr ($errno)\n";
} else {
$out = "PURGE / HTTP/1.0\r\n"
. "Host: www.domain.com\r\n"
. "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>