Re: HTML Mail script reading text from MySQL
| From: | Rabin Vincent | Date: | Fri, 02 Jun 2006 15:43:59 +0000 |
| Subject: | Re: HTML Mail script reading text from MySQL | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237291@lists.php.net to get a copy of this message | ||
On 6/2/06, Tom Chubb <tomchubb@gmail.com> wrote:
What I meant is say a page outputs an HTML table eg: <table width="100" cellspacing="0" cellpadding="0"> [snipped]
</table> But I want to get that code into the $message variable. I have written many mail scripts before it's just getting the data into the variable. Should I be using something like CURL?This other script cannot/should not be modified? Then you can either use shell_exec to execute the script and get the output $message = shell_exec('the/other/script.php'); or use file_get_contents(): $message = file_get_contents('http://domain/script.php?a=b'); or if the other script is also php look into output buffering. php.net/ob_start, php.net/ob_get_contents. Rabin