I'am using email2http to post into my status file !
When I receive the mail and get it posted to my status file , I was to extract some data and assign them to some values
I mean , I made that !
<?php
$body = $_POST['body'];
function plog($errorMsg)
{
$filename = "email.txt";
if ($handle = fopen($filename, 'a+')) {
if (fwrite($handle, $errorMsg) === FALSE) {
echo "Cannot write to file ($filename)";
}
}
else {
echo "Cannot open file ($filename)";
}
fclose($handle);
}
$msgBody .= "$body
";
plog($msgBody."
");
?>
the $_POST['body']
contains the text sent from a mail
lets say all the mails come like this type :
The amount of 5 USD has been deposited to your account. Memo: Shopping Cart Payment. Exchange ID :1317 . Date: 23:07 25.07.13. Batch: 28808853.
So I want to get thos variables :
$amout=5;
$id=1317;
$date=23:07 25.07.13;
$batch=28808853;