Solved

Attach/export HTTP page to email

Posted on 2011-09-27
7
194 Views
Last Modified: 2012-05-12
I have a PHP which is called quite regularly. It provides additional info regarding rows of data on a page. One of the requests is to be able to email this data. (And email this data for multiple rows as a single attachement.)

My logic says I need to call the page on the server (bypassing authentication), render the php to html. Save the output to an HTML file. Then attach and send email. If multiple rows are ticked, it would join the HTML on rendering.

Am I missing anything? Any tips/suggestions?
0
Comment
Question by:xpandit
  • 3
  • 3
7 Comments
 
LVL 9

Expert Comment

by:user_n
ID: 36711385
0
 

Author Comment

by:xpandit
ID: 36711690
Am I missing something in the link? Mime covers how I would attach the export, but I would surely still need to generate the file? Is my logic in my original question correct?
0
 
LVL 9

Expert Comment

by:user_n
ID: 36712074
I have worked with sip packets and mime there, and I have no much experience with html mime. Some more info
http://tools.ietf.org/html/rfc2045
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 9

Expert Comment

by:user_n
ID: 36712080
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 36713905
Please show us the inputs you have and the outputs you want.  I am sure we can show you the code to bridge the gap once we know those things.  Thanks, ~Ray
0
 

Accepted Solution

by:
xpandit earned 0 total points
ID: 36899640
I used CURL to save the html output to a temporary file. I then atatched it to an emal. My logic was correct.
0
 

Author Closing Comment

by:xpandit
ID: 36929320
It worked.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question