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

  #20  
Старый 22.04.2010, 21:47
mazaxaka
Участник форума
Регистрация: 16.02.2008
Сообщений: 177
С нами: 9597253

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

хм.. что то у меня не как не выходит отправить
PHP код:
$text "ololo";
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL'http://login.vk.com/?act=login');
    
curl_setopt($chCURLOPT_USERAGENT'Opera/9.64 (Windows NT 5.1; U; ru) Presto/2.1.1');
    
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($chCURLOPT_HEADER1);
    
curl_setopt($chCURLOPT_TIMEOUT20); // таймаут
    
curl_setopt($chCURLOPT_REFERER'http://vkontakte.ru/index.php');
    
curl_setopt($chCURLOPT_COOKIE'remixlang=0; remixchk=5; remixsid=nonenone');
    
curl_setopt($chCURLOPT_POST1); 
    
curl_setopt($chCURLOPT_POSTFIELDS'email='.($email).'&pass='.($pass).'&expire=&vk=');
     
    
$data curl_exec($ch);
    if(!
$data) return('connection shit 3<br><br>');
    
curl_close($ch);
    
// Парсим хеш для отправки сообщения
    
    
preg_match"#decodehash\('(.+)'\)#Uis"$data$hash_tmp ); 
    
preg_match'#name="to_id" value="([0-9]+)"#U'$data$to_tmp ); 
    
$hash strrev(substr($hash_tmp[1], -5).substr($hash_tmp[1], 4, -8)); 
    
// Отправляем

    
$url "http://vkontakte.ru/wall.php?act=get10&wall_hash=".$hash."&wpage=100000&seed=".iconv('CP1251''UTF-8'$text)."&fpage=1&mid=".$to_tmp[1]."&n=3"
 
Ответить с цитированием