Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to save current webpage as a file? 1

Status
Not open for further replies.
Feb 2, 2005
21
US
I had previously asked how to save a table as a graphic but I think the way I need to go is to simply take the webpage that the user see's and make a .mht file and save it on my server.

Any suggestions where I could look or examples of code?

Thanks,
Follow Your Bliss
 
There's no way to programmatically do this, as PHP runs on the server, not the client.

If you, by hand, save a web page as an MHT file using Insecure Explorer, you can then go to another page which contains a form with inputs of type file and which submits files to a PHP script. See Handline File Uploads in the PHP online manual.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
So there no way to save the output of a php doc as another file? Or is it that you can't save the output as a mht doc?
Good point about the server side thing though. Perhaps this is a job for javascript. Such as, once the page is served then a javascript runs to save it and then upload it to my server.

What I'm trying to accomplish is to serve a page that is a ribbon or trophy of some sort with the user's name on it, then send that to the user in an email. The trophy is a background picture of a table and php servers up the words on the trophy.
 
You might be able to on the fly use GD or PDF libraries to create a PDF that has the same content as the page your reguratationg... I mean serving... but it won't look Exactly the same as in the browser, as it won't have been rendered by a browser.

[plug=shameless]
[/plug]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top