Показать сообщение отдельно

  #2  
Старый 17.07.2008, 15:32
BlackSun
Members of Antichat - Level 5
Регистрация: 01.04.2007
Сообщений: 1,268
Провел на форуме:
10046345

Репутация: 4589


По умолчанию

PHP код:
function send_key ($query,$others=''){ $host='www.dle-files.ru'$path='/extras/activate.php'$post="POST $path HTTP/1.1\r\nHost: $host\r\nContent-type: application/x-www-form-urlencoded\r\n{$others}User-Agent: Mozilla 4.0\r\nContent-length: ".strlen($query)."\r\nConnection: close\r\n\r\n$query"$h=@fsockopen($host,80$errno$errstr30); if (!$h) { $r = @file_get_contents("http://".$host.$path."?".$query); } else { fwrite($h,$post); for($a=0,$r='';!$a;){ $b=fread($h,8192); $r.=$b$a=(($b=='')?1:0); } fclose($h); } if (stristr$r"antw:activated" )) return "1"; if (stristr$r"antw:denied" )) return "0"; return "-1"; } function dle_forum_activation($key$forum_hash$forum_config){ global $config$f_lg$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset']; $domain urlencode(strip_tags ($_SERVER['HTTP_HOST'])); $key strip_tags ($key); $buffer send_key ("domain={$domain}&product_key={$key}&product_id=1"); switch ($buffer) { case "-1" $buffer $f_lg['trial_act1']; break; case "0" $buffer $f_lg['trial_act2']; break; case "1" $forum_config['key'] = $forum_hash$handler fopen(ENGINE_DIR.'/data/forum_config.php'"w"); fwrite($handler$value) { fwrite($handler, "'{$name}' => \"{$value}\",\n\n"); } fwrite($handler");\n\n?>"); fclose($handler); $buffer $f_lg['trial_act3']; break; default: $buffer $f_lg['trial_act4']; } @header("Content-type: text/css; charset=".$config['charset']); echo $buffer; die (); } require_once ENGINE_DIR.'/data/forum_config.php'; require_once ENGINE_DIR.'/forum/language/'.$config['langs'].'/admin.lng'; require_once ENGINE_DIR.'/forum/admin/functions.php'; require_once ENGINE_DIR.'/forum/admin/table.php'; require_once ENGINE_DIR.'/forum/admin/form.php'; require_once ENGINE_DIR.'/forum/classes/cache.php'$forum_hash str_replace("http://"""$_SERVER['HTTP_HOST']); if (strtolower(substr($forum_hash04)) == 'www.'$forum_hash substr($forum_hash4); $forum_hash reset(explode('/'$forum_hash)); $forum_hash reset(explode(':'$forum_hash)); $forum_hash md5(md5('2.2'.$forum_hash.'1739')); $l_full true; if ($forum_hash == $forum_config['key']) $l_full false; if ($_REQUEST['forum_activation'] == "yes") { dle_forum_activation (convert_unicode($_REQUEST['forum_key']), $forum_hash$forum_config); exit; }