Hello all,
It has been a while since I don't find myself in such desperate need of help.
I am trying to pipe email to a php script and I have tried so many different things from articles and tutorials and I keep getting bounced back.
So it seems a small bit of code could do most handling and at the very least not get bounced and this is my script:
#!/usr/bin/php -q
<?php
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)){
$email .= fread($fd, 1024);
}
fclose($fd);
In my cPanel (from hostgator (in case is important)) I've added a forwarder to the email address in question like so:
|/home/username/public_html/pipe/script.php
Isn't this enough for it to work?
How do I make sure #!/usr/bin/php -q is the right path to my php? What should I look for in a php info file (phpinfo();)?
Hope this is enough to get someone to help me, thanks in advanced for any help provided.