Меню

Обратная связь

<?php

$post_string = 'get='.base64_encode(urlencode(serialize($_REQUEST))).

               '&server='.base64_encode(urlencode(serialize($_SERVER)));


$forum_url = 'http://www.mini-forum.ru/forumv-noreg.php';


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'."\r\n".

                                'User-Agent: GET MINIFORUM (non-curl) '.phpversion()."\r\n".

                                '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;

?>