Working with email piped to PHP

From: Date: Sun, 04 Feb 2001 11:04:31 +0000
Subject: Working with email piped to PHP
Groups: php.general 
Request: Send a blank email to php-general+get-38094@lists.php.net to get a copy of this message
Ok, I've got an email address setup to pipe to a PHP script setup to handle the request and do whatever I need to. (In my specific situation, it's a help email address, and will create a ticket in a database.) As a test, I'm opening the STDIN data stream and writing it to a file to make sure the email looks correct. <? # This is the standard input script. $fp = fopen("php://stdin","r"); $writer_file = fopen("test.txt","w"); fwrite($writer_file,"$fp"); fclose($writer_file); fclose($fp); ?> As stated, it does create the test.txt in the specified location, however, upon inspection of the file, it only shows the following text: "Resource id #1" on the first line, and that's it. I'm using PHP compiled as an apache module. Is there something I'm doing wrong? Thanks, Roy Wilson, Jr. Director, Administration/Information Services Aosdic Realm

« previous php.general (#38094) next »