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

Помогите, php+curl+wordpress
  #1  
Старый 14.03.2010, 16:21
eniki
Новичок
Регистрация: 06.09.2009
Сообщений: 3
С нами: 8777913

Репутация: 1
По умолчанию Помогите, php+curl+wordpress

Пишу спамер по wp, в некоторые блоги норм отправляется, а вот в другие не хочет, не пойму почему, помогите пожалуйста разобраться, вот часть кода чисто для теста на блог в который не получается запостить
PHP код:
$ch curl_init();
$url="http://sovch.chuvashia.com/?p=23218";

$html ch_get(&$ch$url);     

$postarray = array('author' => 'name'
                               
'email' => 'mail@ya.ru'
                                
'url' => 'google.ru',  
                                
'comment' => 'comment',  
                                
'submit' => 'Отправить',             
                                 
'comment_post_ID' => '23218',  
                                 
'dcaptcha_sess' => '1');

$html ch_post(&$ch"http://sovch.chuvashia.com/wp-comments-post.php"$url$postarray);

curl_close($ch);

echo 
$html;

function 
ch_get($curl$url)
{
    
curl_setopt($curlCURLOPT_URL$url);
    
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8");
    
curl_setopt($curlCURLOPT_REFERER$ref);
    
curl_setopt($curl,CURLOPT_RETURNTRANSFER1);
    
curl_setopt($curl,CURLOPT_FOLLOWLOCATION1);
    
curl_setopt($curlCURLOPT_COOKIESESSIONTRUE);
    
curl_setopt($curlCURLOPT_COOKIEFILEgetcwd()."/cookies.txt");
    return  
$html curl_exec($curl);
 }




function 
ch_post($curl$url$ref$postdata)
{
    
curl_setopt($curlCURLOPT_URL$url);
    
curl_setopt($curlCURLOPT_REFERER$ref);
    
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8");
    
curl_setopt($curl,CURLOPT_RETURNTRANSFER1);
    
curl_setopt($curl,CURLOPT_FOLLOWLOCATION1);
    
curl_setopt($curlCURLOPT_COOKIESESSION1);
    
curl_setopt($curlCURLOPT_COOKIEJARgetcwd()."/cookies.txt");
    
curl_setopt($curlCURLOPT_COOKIEFILEgetcwd()."/cookies.txt");
    
curl_setopt($curlCURLOPT_POST1);
    
curl_setopt($curl,CURLOPT_POSTFIELDS$postdata);
    return  
$html curl_exec($curl);


Последний раз редактировалось eniki; 14.03.2010 в 16:30..
 
Ответить с цитированием