Skip to content

syslogic/php-phantomjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-phantomjs

a PHP5 wrapper for the PhantomJS Web Page Module


Overview

This class is still rather basic - might extend it, while I see some practical use.

Usage

getting a Handle

require_once('phantomjs.php');
$phantomjs = new phantomjs();

taking Screenshots (generally working)

$phantomjs->screenshot("https://www.google.com", true);

the PhantomJS script, which is being generated:

var page = require('webpage').create();
page.viewportSize = {width: 1024, height: 768};
page.open('https://www.google.com', function() {
	page.render('google.com_857627499_1024x768.jpg');
	phantom.exit();
});

the returned JSON (while $output=true is passed):

{"success":true,"script":"\/php-phantomjs\/scripts\/google.com_1293740674.js"}

About

a PHP5 wrapper for PhantomJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published