#native_company# #native_desc#
#native_cta#

Creating a PHP Script for Web Mail Posting and Notification Page 5

By Jochen Staerk
on May 17, 2004

THE RECEIVER SCRIPT

In the script yourdomain.com/yourscript.php you can now read out
$_POST[“stdIn”]. The echo-allocation in this script will be ignored,
because the user did not submit the imaginary (hidden) field via a web browser,
but with his standard mail client.

<?php

   $f
=fopen("/tmp/output.txt""w");

   
fputs($f"I got the following mail:".$_POST["stdIn"]);

   echo 
"Received mail:".$_POST["stdIn"];

   
fclose ($f);

?>



FINDINGS
The script is fairly versatile because it is not limited to posting
mails, but also further standard inputs. Also, other scripts such as JSP files and
Perl Scripts would be imaginable to receive the standard input. Maybe
you want to use the output of a cron-job in PHP? Should you have interesting
ideas, let me know or simply comment this article.
-Jochen

1
|
2
|
3
|
4
|
5