Simple little code for checking gmail using headerinfo
Gmail mod for admin panels or you can edit it and convert html results to XML for personal RSS reader */
// enter gmail username below e.g.--> $m_username = "yourusername";$m_username="";// enter gmail password below e.g.--> $m_password = "yourpword";$m_password="";// enter the number of unread messages you want to display from mailbox or
//enter 0 to display all unread messages e.g.--> $m_acs = 0;$m_acs=15;// How far back in time do you want to search for unread messages - one month = 0 , two weeks = 1, one week = 2, three days = 3,
// one day = 4, six hours = 5 or one hour = 6 e.g.--> $m_t = 6;$m_t=2;//----------->Nothing More to edit below
//open mailbox..........please$m_mail=imap_open("{imap.gmail.com:993/imap/ssl}INBOX",$m_username."@gmail.com",$m_password)// or throw a freakin error............you pigor die("ERROR: ".imap_last_error());// unix time gone by or is it bye.....its certanly not bi.......or is it? ......I dunno fooker$m_gunixtp= array(2592000,1209600,604800,259200,86400,21600,3600);// Date to start search$m_gdmy=date('d-M-Y',time() -$m_gunixtp[$m_t]);//search mailbox for unread messages since $m_t date$m_search=imap_search($m_mail,'UNSEEN SINCE '.$m_gdmy.'');//If mailbox is empty......Display "No New Messages", else........ You got mail....oh joyif($m_search<1){$m_empty="No New Messages";}
else {// Order results starting from newest messagersort($m_search);//if m_acs > 0 then limit resultsif($m_acs>0){array_splice($m_search,$m_acs);
}//loop itforeach ($m_searchas$what_ever) {//get imap header info for obj thang$obj_thang=imap_headerinfo($m_mail,$what_ever);//Then spit it out below.........if you dont swallowecho"
|
}} echo"