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

  #14  
Старый 27.08.2009, 15:42
geforse
Постоянный
Регистрация: 02.03.2008
Сообщений: 893
С нами: 9574565

Репутация: 712


Smile

PHP код:
<?php
@set_time_limit(0);
//-----------------//
$accounts = 'accounts.txt'; // Файл для сохранения аккаунтов
$divider  = ':';           // Раздеитель 
$login = '';              // Login
$password = '';          // Password
$email = '';            //  E-mail
//-----------------//

       
function post($url,$post,$refer)
    {
       
$ch = curl_init($url);
       
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
       
curl_setopt($ch, CURLOPT_POST, 1);
       
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
       
curl_setopt($ch, CURLOPT_REFERER, $refer);
       
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook1");
       
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook1");
       
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
       
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       
$result  = curl_exec($ch);
       return 
$result;
    }
    
        if(
$_POST['captcha'])
    {
      
$result = post('http://moemesto.ru/register/','from=button&captchaid='.$_POST['captchaid'].'&login='.$login.'&email='.$email.'&password='.$password.'&captcha='.trim($_POST['captcha']).'&do_reg=%D0%97%D0%B0%D1%80%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C%D1%81%D1%8F','Referer: http://moemesto.ru/register/?from=button');
      
$result = iconv("UTF-8","Windows-1251",$result);
       if(
preg_match('#2>П(.*?)з#i',$result,$end))
        {
          
$fh = fopen($accounts, "a+");
          
$success - fwrite($fh, $login.$divider.password."\r\n");
          
fclose($fh);
          
Header('Location: index.php');
        }
        else
        {
          echo 
'<script>alert(\'Не правильный код!\')</script>';
          echo 
'<meta http-equiv="Refresh" content="0; url=index.php">'; 
        }
    }
    else
    {
    
$result = post('http://moemesto.ru/register/',null,'http://moemesto.ru/');
    
preg_match('#id" value="(.*?)"#i',$result,$captchaid);
    
        echo 
'<img src="http://moemesto.ru/captcha/'.$captchaid[1].'"><br>
          <form name="captcha_form" action="index.php" method="POST">
          <input type="text" name="captcha" value="" /><br>
          <input type="hidden" name="captchaid" value="'
.$captchaid[1].'" />
             <input type="submit" value="ok">
           </form>'
; 
    }
/* geforse.name */
?>
 
Ответить с цитированием