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



RSS Twitter
Articles Php Functions

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

by: Jochen Staerk
|
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

« Previous Page
1
|
2
|
3
|
4
|
5

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Jochen Staerk

Comment:



Comment:

(Maximum characters: 1200). You have characters left.