title: PHP: Is it possible to save a website, simulating a manual save?
body: <p>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? </p>
  
  <p>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.</p>
  
  <p>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: </p>
  
  <pre><code>&lt;div class="StartofSecretSourceCode"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Instead of: </p>
  
  <pre><code>&lt;div class="StartofSecretSourceCode"&gt;
      &lt;div class="Something"&gt;Some stuff and things&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>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 <strong>manually save the webpage</strong>. </p>
  
  <p>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 >.&lt;</p>