Re: need some ideas here...

From: Date: Tue, 15 May 2001 15:56:27 +0000
Subject: Re: need some ideas here...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52880@lists.php.net to get a copy of this message
At 20:32 14/5/2001 -0500, Ben Gollmer wrote:
If you have an account on a remote host, you can always do something like this: <?php
        include("http://www.remotehost.com/~myaccount/mailfunction.inc");
        mymail($to, $mailbody);
?> where mailfunction.inc has the mymail function defined to just take your parameters and stuff them into the standard mail(). Of course include()ing from remote hosts can be disabled when compiling PHP, and if your host is really evil, the will have disabled this too. Your last resort is to create your own mail function by fsockopen()ing a connection to port 25 of your SMTP server and sending raw SMTP commands. This would require some reading of the relevant mail RFCs...but is definitely feasible.
I tried using fopen('.....') on a script hosted at a domain that belongs to me that sends email... trying it here (even calling the script elsewhere on the internet 'http://www.mydomain.com') it wordked perfect... then I tried the fsockopen alternative... it didn't work... f2s runs in safemode... so in their faq, they tell us that if we won't some more advanced scripts... to use the cgi version (script.cgi starting with '#!/usr/bin/php'... and so on)... nothing works... they must have a real protection against acessing outer files there...

« previous php.general (#52880) next »