my.mail.ru curl?
    ~
Advanced Hosters -

Yabuti
V.I.P.
: 28.11.2008
: 11277
Contest (: 2)
# : 09, 2012 4:53 pm
!
php, , curl my.mail.ru ( )?

:
:
header('Content-type: text/html; charset=utf-8');
setlocale(LC_ALL, 'ru_RU.utf8');
date_default_timezone_set('Europe/Moscow');
 
//
$login = '';
$password = '';
 
$user_agent = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1';
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
 
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookie.txt');
 
curl_setopt($ch, CURLOPT_POST, false);
 
curl_setopt($ch, CURLOPT_URL, "http://swa.mail.ru/cgi-bin/auth?Password=$password&Login=$login");
 
curl_exec($ch);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
echo curl_setopt($ch, CURLOPT_URL, "http://m.mail.ru/cgi-bin/gosearch?q_read=2&q_folder=all");
 
$answer = curl_exec($ch);
 
$matches = array();
preg_match_all('/<span>([^<]+)<\/span>/', $answer, $matches);
 
foreach ($matches[1] as $value) {
    echo $value . '<br />';
}



echo file_get_contents("http://my.mail.ru/");

echo "<br><br>FINISH";


- Mail.ru, (my.mail.ru) - .

.

!
PQCService.net 7 , icq: 87244588
EvaPharmacy. , ! Jabber: [email protected] ICQ: 750000

Codd
: 13.01.2011
: 186
# : 09, 2012 7:22 pm
:
echo file_get_contents("http://my.mail.ru/");


curl Smile

:
<?php

require 'curl.php';

$curl = new Curl();

# [email protected]
$domain = 'mail.ru';
$login = 'user;
$password = 'pass';

#
$curl
    ->url('https://auth.mail.ru/cgi-bin/auth')
    ->postarray(array('Domain' => $domain, 'Login' => $login, 'Password' => $password))
    ->go('post');

#
foreach($curl->info['cookies'] as $key => $val)
    $curl->cookies .= "$key=$val";

#
echo $curl->url('http://my.mail.ru/')->go()->res;



curl.php

Yabuti
V.I.P.
: 28.11.2008
: 11277
Contest (: 2)
# : 09, 2012 9:10 pm
Codd, , ! :thup: Yahoo!
PQCService.net 7 , icq: 87244588
EvaPharmacy. , ! Jabber: [email protected] ICQ: 750000
    ~