<?php $username = 'login@googlemail.com'; $password = ''; $ch = curl_init('https://mail.google.com/mail/feed/atom'); curl_setopt($ch, CURLOPT_RETURNTRANSER, true); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); print curl_exec($ch); ?>
<?php echo file_get_contents("https://login@gmail.com:pass@mail.google.com/mail/"); ?>