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

  #2  
Старый 12.05.2009, 13:15
Player#1
Познающий
Регистрация: 11.11.2008
Сообщений: 77
С нами: 9208644

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

Вот на PHP с использованием CURL

PHP код:
<?php
set_time_limit
(0);

$email="";
$pass="";


function 
curl($url,$post)
{
    
$cfile = 'cookies.txt';
    
$ch = curl_init();
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($ch, CURLOPT_URL, $url);
    
curl_setopt($ch, CURLOPT_HEADER, 1);
    
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); 
    return 
$result;
    
};
$result = curl("http://vkontakte.ru/login.php","email=$email&pass=$pass");
preg_match('[<IMG SRC=(\S+) ALT =]', $result, $src);
echo 
$src[1];
?>
 
Ответить с цитированием