<META http-equiv=Content-Type content="text/html; charset=utf-8">javascript
<?php
php
if ($_POST[url]){
$url = $_POST[url];
}html
$url2 = explode("/",$url);java
if ($url2[0] == "http:"){
$url = str_replace("http://","",$url);
}else {
$url = $url;
}web
preg_match("/\/(.*)/",$url,$preg);ide
$url = explode("/",$url);post
$url = "http://".$url[0]."/purge".$preg[0];ui
$purge = file_get_contents("$url");url
if ($_POST[url]){
if ($purge){
echo $purge;
}else {
echo "<center><font size=10>Purge fail</font><br><br>".$url."<font color=red> not exist !</font><hr></center>";
}}else {
echo "<center><br><font size=10>webname cache purge system</font><br><br><hr></center>";
}orm
?>
<script type="text/javascript">
function CheckPost(){
if (myform.url.value==""){
alert ("請填寫URL");
myform.url.focus();
return false;
}
}
</script>
<center><form action="" method="post" name="myform" onsubmit="return CheckPost();">輸入URL:http:// <input name="url" type="text" size="50"> <input type="submit" value="clean"><br> </form></center>