title: How to print html source to console with phantomjs
body: <p>I just downloaed and installed phantomjs on my machine. I copy and pasted the following script into a file called hello.js:</p>
  
  <pre><code>var page = require('webpage').create();
  var url = 'https://www.google.com'
  
  page.onLoadStarted = function () {
      console.log('Start loading...');
  };
  
  page.onLoadFinished = function (status) {
      console.log('Loading finished.');
  phantom.exit();
  };
  
  page.open(url);
  </code></pre>
  
  <p>I'd like to print the complete html source (in this case from the google page) to a file or to the console. How do I do this?</p>