SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Capturing PHP generated HTML to use in email

    I need to capture the HTML source code that is generated by a php page to put in an HTML email. I have created the page and I can manually copy the html code and paste it in a variable and then use php's mail() function to send an html email. I need help figuring out how to automatically capture the html source (then escape all the double quotation marks) in to a file or a variable.

    Any ideas will be greatly appreciated.

    Thanks

    Dave

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Bloomington, IL
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out:
    http://www.php.net/manual/en/ref.outcontrol.

    From http://www.php.net/ob_start:
    The contents of this internal buffer may be copied into a string variable using ob_get_contents().
    Once the output is stored in a string, you can use the addslashes function to escape the quotes.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •