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

  #2  
Старый 06.10.2009, 21:01
svesve
Постоянный
Регистрация: 15.06.2007
Сообщений: 527
С нами: 9950786

Репутация: 214


По умолчанию

держи

PHP код:
    $email='pawa@vkontakte.ru';
    
$pass='ololol';

    
$cfile = 'cookies.txt'; 
    
$ch = curl_init(); 
    
$url = 'http://vkontakte.ru/login.php';
    
$post = 'email='.$email.'&pass='.$pass;

    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    
curl_setopt($ch, CURLOPT_URL, $url); 
    
curl_setopt($ch, CURLOPT_HEADER, 0); 
    
curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
    
curl_setopt($ch, CURLOPT_COOKIEJAR, $cfile); 
    
curl_setopt($ch, CURLOPT_COOKIEFILE, $cfile); 
    
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
    
curl_setopt($ch, CURLOPT_POST, 1); 
    
$result = curl_exec($ch); 
    
curl_close($ch); 
 
Ответить с цитированием