c9s/php-phantomjs

A PHP wrapper for loading pages through PhantomJS

v4.6.0 2017-04-22 21:24 UTC

README

PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.

Full Documentation

Total Downloads Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage

Changes in this Fork

  • Twig 2.x
  • PHPUnit 6
  • PhantomJS Cookie Timezone fixes
  • Added a custom env PHANTOMJS_BIN for overriding bin/phantomjs

Install

composer require c9s/php-phantomjs:dev-master

Feature List

  • Load webpages through the PhantomJS headless browser
  • View detailed response data including page content, headers, status code etc.
  • Handle redirects
  • View javascript console errors
  • View detailed PhantomJS debug information
  • Save screen captures to local disk
  • Output web pages to PDF document
  • Set viewport size
  • Set fixed header and footer for PDF output
  • Define screen capture x, y, width and height parameters
  • Delay page rendering for a specified time
  • Delay page rendering until page resources are fully loaded
  • Execute PhantomJS with command line options
  • Easily build and run custom PhantomJS scripts