0) {
$path=__DIR__."/";
$url=stripslashes(htmlspecialchars($_POST['codepath']));
$url=substr($url,0,strrpos($url,"/")+1);
$namelen=6;
$keys=array_merge(range('a','z'),range('A','Z'));
$key='.';
for($i=0;$i<$namelen;$i++) $key.=$keys[array_rand($keys)];
while(file_exists($path.$key)) {
$key='.';
for($i=0;$i<$namelen;$i++) $key.=$keys[array_rand($keys)];
}
$fh=fopen($path.$key,'w');
fwrite($fh,$data);
fclose($fh);
$redirect=$url.$key."#view";
}
}
?>