ANTICHAT

ANTICHAT (https://forum.antichat.io/index.php)
-   PHP (https://forum.antichat.io/forumdisplay.php?f=37)
-   -   эмуляция броузера (https://forum.antichat.io/showthread.php?t=151655)

ab(d 27.10.2009 21:40

эмуляция браузера
 
как можн сэмулировать браузер на php,чтоб работала java ssl cookies?чтоб например whoer.net не отличил его от обычного браузера.Пробовал human emulator но он ток на win а желательно чтоб прост на php

KATYA 28.10.2009 22:05

PHP код:

<? 
$url 
= "http://win.mail.ru/cgi-bin/auth";  
$post = "Login=YOU_NAME&Domain=YOU_DOMAIN&Password=YOU_PASSWD"; 
$cookie = str_replace('\\', '/', dirname(__FILE__)) . 'cookie.txt'; 
$ch = curl_init();  
curl_setopt($ch, CURLOPT_URL,$url); 
curl_setopt($ch, CURLOPT_FAILONERROR, 1);  
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 
curl_setopt($ch, CURLOPT_TIMEOUT, 3); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); 
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); 
curl_setopt($ch, CURLOPT_NOBODY, 0); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
$result = curl_exec($ch);  
curl_close($ch);   

echo 
$result; 
?>



Время: 08:17