var system = require('system');
if (system.args.length !=2) {
console.log('Usage: '+system.args[0]+' domain');
phantom.exit(1);
} else {
var domain = system.args[1];
var page = require('webpage').create();
page.viewportSize = {
width: 1280,
height: 800
};
page.open('http://'+domain+'/', function() {
page.render(''+domain+'.png');
phantom.exit();
});
}