I understand how to use fopen, file_get_contents, etc - but I'm curious to know if there is a way to generate a "manual save" on a webpage? As if I were to physically right-click > "Save As" > to Desktop?
I'm asking this because I'm trying to learn more about securing data. I didn't think it was possible to hide source code, but I recently found out that can be done by putting the code in JavaScript. So the "hidden code" won't appear in View Source, but it will still appear in Firefox Web Developer Tools and such.
So let's say I'm using JavaScript to secure my source code (as best as can be, that is). If someone were to Ctrl+U (View Source) my webpage (or fopen/file_get_contents), they would see:
<div class="StartofSecretSourceCode"></div>
Instead of:
<div class="StartofSecretSourceCode">
<div class="Something">Some stuff and things</div>
</div>
In order for the user to see the full source code in this section, they would have to inspect the code in Firefox/Firebug/etc or manually save the webpage.
So I'm wondering if it's possible for someone to automate "manually saving" the webpage using PHP (or something else). And if so, I'm curious to know how you would do that in PHP. I hope that my question makes sense >.<