On 10-Jun-2003 Maikel Verheijen wrote:
<snip>
>
> Unfortunately php does NOT pass on these environment variabeles to the
> program that gets called as the mail-program (In my case my
> mini-sendmail).
> This renders this little "spamfinder" trick unusable, which is too bad :(
>
> If someone has a clue/trick for me on how to enable this, I would be
> really
> gratefull!
>
<?php
$cmd='/bin/sh -c "set"';
passthru($cmd);
echo '<P>';
putenv("REMOTE_ADDR=$REMOTE_ADDR");
passthru($cmd);
echo '<P>';
?>
------- output wrapped:
HOME=/ PS1='$ ' OPTIND=1 PS2='> ' PPID=2612
PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' '
REMOTE_ADDR=127.0.0.2 HOME=/ PS1='$ ' OPTIND=1 PS2='> ' PPID=2614
PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' '
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php