I would like to know what would is the best-of-the-contents from a Web page. I mean to force save-as option by clicking a link or button. I often found that JavaScript would not is an option because it's only working for IE, so I thought the it would be Easie R because JavaScript is client-side based.
Now, I thought maybe there is a-to-use PHP when creating a form that would redirect it over a server site query to Retu RN and force the SAVE-AS option. My main goal is make it possible to save the privacy terms. I would like to avoid using fpdf. If There is someone the Who could tell how to solve this I would really appreciate it.
UPDATE:
Okay to explain what I like to reach:
Imagine you has a simple webpage with some privacy policy text and nothing else. At the top of the page there are the options. First would be the print option like:
<a href="Javascript:print ()">Print</a>
Second should is something like:
<a href="Javascript:saveas ()">Save</a>
So if you'll press the link the Save-as dialog pops up and you can download the content or even page to get the P Rivacy policy for your own.
Hope it'll be a clear now. Sorry.
If you want to force a download without JavaScript, simply open the content in a new tab by adding a unknown target.
Example Code
<a href="Whatever.com/download.zip" Target="_new">Click Me</a>
This works only if the page offers a download, otherwise the content gets displayed. Need a simple php-file, which gets the content from the page and customizes the header.
<?php$content=file_get_contents($_get["DownloadURL"]);Header("Content-type:application/octet-stream");Echo $content;?>
UPDATE
As a more detailed example for your edited informations, you could probably does this:
Php-file "Reader.php"
<?php$content=file_get_contents($_get["DownloadURL"]);Header("Content-type:application/octet-stream");Echo $content;?>
HTML on page "test.html"
<a href="Reader.php?downloadurl=http://yourwebsite.com/test.html" Target="_new">Save website</a>