Just a small addendum, I also suggest using -C if you are using a non CLI PHP binary. This prevents PHP from changing directories to the location of the script. Perhaps not important for your needs, but if like me, you do many shell based scripts without the CLI version, it is very useful.
Cheers, Rob. Adrian Teasdale wrote: > > Wow, thanks! A nice detailed reply that should keep me busy for a good few > hours > > All the best > > Ade > > > -----Original Message----- > > From: John S. Huggins [mailto:[EMAIL PROTECTED] > > Sent: 11 June 2003 23:02 > > To: Adrian Teasdale > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] piping email directly into PHP > > > > > > On Wed, 11 Jun 2003, Adrian Teasdale wrote: > > > > >-Hi there > > >- > > >-We are wanting to create a little help/crm tool for internal > > use. Rather > > >-than reading (and parsing) in an email from a pop account, is it now > > >-possible to pipe email in directly to a database via PHP? If so, any > > >-pointers on how to do it and anything to watch out for? > > > > You might get good clues by examining the phorummail.php file in the > > Phorum.org forum script in their scripts directory of their tarball. > > > > http://www.phorum.org/ > > > > As I recall, it is meant to be passed email messages via .forward or > > something like that. It then looks at the mail contents and deals with it > > accordingly. Phorum is a MySQL thing so I assume they write the data to > > the database. > > > > Note that this file is meant to run like a typical shell script with this > > in the first line: > > > > #!/usr/local/bin/php -q > > > > Thus, you must have a compiled php executable in /usr/local/bin or > > whereever you keep your favorite programs. > > > > Just compile PHP with no parameters in ./configure and it should make a > > php binary perfect for use as a shell program tool. > > > > The "-q" turns off header generation I think making php a very suitable > > progamming language. -- .---------------------------------------------. | Worlds of Carnage - http://www.wocmud.org | :---------------------------------------------: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul. | `---------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php