title: From file_put_contents to saved file on server
body: <p>I'm using a Google project API to convert HTML to PDF.  Works great and is amazing.  You can get it here if you want:
  <a href="http://code.google.com/p/dompdf/" rel="nofollow">http://code.google.com/p/dompdf/</a></p>
  
  <p>My question is as follows, the plugin does it's magic and I obtain something like this:</p>
  
  <pre><code>file_put_contents("nameOfPdf.pdf", $pdf);
  </code></pre>
  
  <p>How do I go from this to saving it to my server?  I'm new to saving info to server, so please detail a bit.  </p>
  
  <p>Thanks.</p>
  
  <p><strong>MORE OF THE CODE HERE</strong></p>
  
  <pre><code>  $dompdf = new DOMPDF();
    $dompdf-&gt;load_html($html);
    $dompdf-&gt;set_paper( "a4" , "portrait");
    $dompdf-&gt;render();
  
    $dompdf-&gt;stream("xxxxx.pdf", array("Attachment" =&gt; false));
  
    $pdf = $dompdf-&gt;output();
  
  // You can now write $pdf to disk, store it in a database or stream it
  // to the client.
  
      file_put_contents("xxxxx.pdf", $pdf);
  </code></pre>