On Sat, 28 Jul 2001, PHP Webmaster wrote:

> the .qmail makes a program delivery to a PHP script at
> http://www.mydomain.com/parser.php which then stores
> the message in a database. The PHP installation is as
> an Apache module so I think I might have to use Lynx.
>
> So here is something I've come up with:
>
> |/usr/bin/lynx -source
> "http://mydomain.com/parser.php";

That won't work exactly as is, since you need lynx to send the contents of
standard input to the PHP script as POST data. "man lynx" shows the
following option:

       -post_data
              send  form  data  from  stdin using POST method and
              dump results.

So try putting -post_data in the lynx command.

A more correct way of doing this would be to run php from the command
line. Try typing locate php | grep "/php$" to see if a PHP executable is
available on your system. If not, you can compile one by downloading PHP
from php.net, doing "./configure" (don't include any options in
./configure), then "make" (don't do "make install"), and just copy the
"php" executable that it creates to whereever you need it.

If you go with the PHP executable, you would put in your .qmail file:

|/path/to/php -q /path/to/script.php

(-q tells it not to send HTML headers.)

Reply via email to