title: Phantomjs to take a screenshot of site as rendered on iphone
body: <p>I would like to use phantomjs to take a screenshot of a webpage like if is rendered on iphone.</p>
  
  <p>I use this:</p>
  
  <pre><code>page.settings.userAgent = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 6_0 like Mac OS X; en-us) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A523 Safari/8356.25';
  page.viewportSize = { width: 320, height: 480 };
  
  
  page.open(address, function (status) {
      if (status !== 'success') {
          console.log('Unable to load the address!');
          phantom.exit(2);
      } else {
          window.setTimeout(function () {
              page.clipRect = { top: 0, left: 0, width: 320, height: 480 };
              page.render(output);
              phantom.exit(3);
          }, 200);
      }
  });
  </code></pre>
  
  <p>But doesn't seems to work...</p>