Skip to content

Instantly share code, notes, and snippets.

@lukespragg
Created September 17, 2014 08:12
Show Gist options
  • Save lukespragg/01572da71625c8130927 to your computer and use it in GitHub Desktop.
Save lukespragg/01572da71625c8130927 to your computer and use it in GitHub Desktop.
Old Gmail reader script in PHP
<?php
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
include_once('gmail.php');
$gmail = new GmailReader('[email protected]', 'asecurepassword');
$gmail->openMailBox('Avast');
$email = $gmail->getEmailSince('Fri, 5 Sep 2008 9:00:00');
foreach ($email[0] as $emailtext) {
$arr = explode("---------- cut here ----------", $emailtext); $code=trim($arr[1]);
print "$code\n";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment