connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) {
echo "Ooops $pop3->ERROR
\n";
exit;
}
$Count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass'));
if((!$Count) || ($Count == -1)) {
echo "
$iCount
Subject: $subject
\n"; $subject = trim(str_replace(get_settings('subjectprefix'), '', $subject)); if ($content_type == 'multipart/alternative') { $content = explode('--'.$boundary, $content); $content = $content[2]; $content = explode('Content-Transfer-Encoding: quoted-printable', $content); $content = strip_tags($content[1], 'Content-type: $content_type, boundary: $boundary Raw content: Login: $user_login, Pass: $user_pass Wrong login or password. Posted title: $post_title".$content.'
';
$btpos = strpos($content, get_settings('bodyterminator'));
if ($btpos) {
$content = substr($content, 0, $btpos);
}
$content = trim($content);
$blah = explode("\n", $content);
$firstline = $blah[0];
$secondline = $blah[1];
if (get_settings('use_phoneemail')) {
$btpos = strpos($firstline, get_settings('phoneemail_separator'));
if ($btpos) {
$userpassstring = trim(substr($firstline, 0, $btpos));
$content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
$btpos = strpos($content, get_settings('phoneemail_separator'));
if ($btpos) {
$userpassstring = trim(substr($content, 0, $btpos));
$content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
}
}
$contentfirstline = $blah[1];
} else {
$userpassstring = $firstline;
$contentfirstline = '';
}
$flat = 999.0;
$flon = 999.0;
$secondlineParts = explode(':',$secondline);
if(strncmp($secondlineParts[0],"POS",3)==0) {
echo "Found POS:
\n";
//echo "Second parts is:".$secondlineParts[1];
// the second line is the postion listing line
$secLineParts = explode(',',$secondlineParts[1]);
$flatStr = $secLineParts[0];
$flonStr = $secLineParts[1];
//echo "String are ".$flatStr.$flonStr;
$flat = floatval($secLineParts[0]);
$flon = floatval($secLineParts[1]);
//echo "values are ".$flat." and ".$flon;
// ok remove that position... we should not have it in the final output
$content = str_replace($secondline,'',$content);
}
$blah = explode(':', $userpassstring);
$user_login = $blah[0];
$user_pass = md5($blah[1]);
$content = $contentfirstline.str_replace($firstline, '', $content);
$content = trim($content);
echo "
";
echo "\nPosted content:".$content.'
Oops '.$pop3->ERROR.'
Mission complete, message $iCount deleted.
"; } } else { echo 'Level 0 users can\'t post.
'; } echo ''; if ($output_debugging_info) { ob_end_flush(); } else { ob_end_clean(); } } } $pop3->quit(); timer_stop($output_debugging_info); exit; ?>