Page 1 of 1

Inserting External HTML into Variable

Posted: Mon Sep 15, 2008 11:50 am
by mlarson154
I have a by-weekly newsletter to which I am trying to add a "forward to a friend" form. What I want to do is include the full HTML newsletter into the notice for the friend, but I'm having trouble getting it to insert correctly. I'm using ob_start(); to attempt this. The following is my code:

Code: Select all

 
ob_start();
    include "urlexample.htm";
    $newsletter_html = ob_get_contents();
ob_end_clean();
 
I have also used ob_get_clean();, but neither are giving me the HTML output from the url.
I have inserted a link via this method and the link itself will show up in the email, but if I try to include the html, it won't. So, I know that the ob_ processes are functioning correctly.
I've checked my "output_buffering" setting in my php.ini file and it is turned on.

Any thoughts?