
14.12.2008, 05:42
|
|
Постоянный
Регистрация: 05.12.2004
Сообщений: 647
Провел на форуме: 1698585
Репутация:
818
|
|
Задам вопрос иначе, имею код, но чтото в нем неправильно и меня шлют на. Мб с сессией чтото не так
PHP код:
<?php
$url = "uuurrrlll";
$ua = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4";
$ref = "uuurrrlll";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_REFERER, $ref);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
$res = curl_exec($ch);
preg_match('#WASESSION=([0-9a-z_]{24})#i', $res, $matches_wa);
preg_match('#JSESSIONID=([0-9a-f]{32})#i', $res, $matches_js);
$sid3 = $matches_wa[1];
$js = $matches_js[1];
$cookie = "JSESSIONID=$js; WASESSION=$sid3 Path=/; Secure";
$post = "sid3=$sid3&user_input_0=_next&user_input_1=1231231231&user_input_2=4548&user_input_timestamp=";
sleep(2);
unset($ch);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_REFERER, $ref);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$res = curl_exec($ch);
?>
|
|
|