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

  #2  
Старый 11.05.2009, 09:42
Gifts
Reservists Of Antichat - Level 6
Регистрация: 25.04.2008
Сообщений: 827
С нами: 9497186

Репутация: 1304


По умолчанию

alex.k12
PHP код:
 $ch = curl_init();  
    
curl_setopt($ch, CURLOPT_URL,$url);
    
curl_setopt($ch, CURLOPT_HEADER, 1);
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0);
    
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
    
curl_setopt($ch, CURLOPT_PROXY, $proxy);    
    
    
$headers[] = $ua;
    
$headers[] = 'Accept:image/png,image/*;q=0.8,*/*;q=0.5';
    
$headers[] = 'Accept-Language:ru,en-us;q=0.7,en;q=0.3';
    
$headers[] = 'Accept-Encoding:gzip,deflate';
    
$headers[] = 'Accept-Charset:windows-1251,utf-8;q=0.7,*;q=0.7';
    
$headers[] = 'Keep-Alive:300';
    
$headers[] = 'Proxy-Connection:keep-alive';    
    
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);    
    
    
$ss=curl_exec($ch);
    
curl_close($ch);

    
    
$sessid=substr($ss, strpos($ss, "PHPSESSID=")+10, 26);
    if (
$sessid) echo "Session ID: $sessid<br>";
    list(,
$out) = explode("\r\n\r\n", $ss, 2);
    return 
$out; 

Последний раз редактировалось Gifts; 11.05.2009 в 09:44..
 
Ответить с цитированием