Updated Thread - Saving php page as html

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GrayZone
Forum Newbie
Posts: 1
Joined: Wed Sep 19, 2007 5:47 am

Updated Thread - Saving php page as html

Post by GrayZone »

I am trying to set up an email survey whereby a form I have written (linked to an MySQL database) will be emailed to recipients.

Each recipient will receive a copy of the form personalised with their details, for them to amend and send back.

The form takes the format http://www.mysite.com/survey.php?URN=xx where xx is their unique reference.

I plan to go through the pages automatically, save an html copy of the dynamic page and then email the result, then onto the next page until the end of the recordset.

The question is, how do I save an html copy of a specific dynamic page as described above from php? Obviously I will generate the link as the page name then append the URN onto the end.

Any suggestions gratefully received...!

Cheers

G

=========================================================================
Old Post.
------------
I have two ideas for doing this:
Either I will have seperate php code which will loop through records and call the form as a template for the email.
OR
Start a process whereby each page opens from the first record, sends itself as an html email, and then automatically goes to the next record, sends, etc until it reaches the last record.

I have phpmailer installed and have tested it with simple html messages.

My question is, which method is easiest to code, and how can I either:
Refer to a template (as a php file with a URL parameter) for the email to be sent
OR
How do I email a current php page as an html email using php?

Many thanks in advance for your help.

G
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Take a look at Swift Mailer.
Post Reply