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

  #3  
Старый 18.02.2010, 19:58
WNZRS
Участник форума
Регистрация: 03.09.2009
Сообщений: 179
С нами: 8782736

Репутация: 90
По умолчанию

PHP код:
<?php
    fclose
(fopen('cookie.txt', 'w'));
    
    
$url = array(
        
'login'=>'http://fundux.ru/login',
        
'index'=>'http://fundux.ru/',
        
'post'=>'http://fundux.ru/project'
    
);
    
    
$login_data = 'login=XD;pass=WuHoMoCruF';
    
    
$messages = file('mess.txt');
    
    
$curl = curl_init();
    
$setopt = array(
        
CURLOPT_URL => $url['login'],
        
CURLOPT_POST => 1,
        
CURLOPT_RETURNTRANSFER => 1,
        
CURLOPT_TIMEOUT => 60,
        
CURLOPT_REFERER => $url['index'],
        
CURLOPT_USERAGENT => 'Mozilla/4.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3',
        
CURLOPT_COOKIEJAR => 'cookie.txt',
        
CURLOPT_HEADER => 0,
    );
    
curl_setopt_array($curl,$setopt);
    
curl_setopt($curl,CURLOPT_POSTFIELDS, $login_data);
    
curl_exec($curl);

    
curl_setopt($curl, CURLOPT_URL, $url['post'].rand(1, 9999));
    
curl_setopt($curl,CURLOPT_POSTFIELDS, 'message='.$messages[0].'&does=1&secure=1266508429&chas=d8841b08bc');
    
curl_exec($curl);
    
    
curl_setopt($curl, CURLOPT_URL, $url['post'].rand(1, 9999));
    
curl_setopt($curl,CURLOPT_POSTFIELDS, 'message='.$messages[1].'&does=1&secure=1266508429&chas=d8841b08bc');
    
curl_exec($curl);
    
    
curl_close($curl);


?>
что-то типа этого, только ещё надо парсинг secure и chas для постинга
 
Ответить с цитированием