0x1998 - MANAGER
Edit File: readmail_logOpen.php
<?php $host="{ssl0.ovh.net:995/pop3/ssl/novalidate-cert}"; // voir http://fr.php.net/imap_open $login="logs.routeur@samu92.com"; //imap login $password="LSdhds92."; //imap password $mbox = imap_open ($host,$login,$password); echo "<p><h1>Entetes de mail dans INBOX</h1>\n"; $headers = imap_headers ($mbox); if ($headers == false) { echo "Erreur !\n"; } else { for ($i=0;$i<count($headers);$i++) { $text = imap_fetchbody($mbox, $i+1, 1); $text=str_replace("\n","",$text); $text=str_replace("\r","",$text); $text=str_replace("[","\r[",$text); $text.="\r//\r"; if( !($fp = fopen('logs.txt', 'a+')) ) return; fwrite( $fp, $text ); imap_delete($mbox, $i+1); } } imap_expunge($mbox); imap_close($mbox); ?>