First of all you need to install Yii2 phantomjs extension using below Command
$ composer require "jonnyw/php-phantomjs:4.*"
$ composer require "jonnyw/php-phantomjs:4.*"
Phantomjs Usage:
use JonnyW\PhantomJs\Client;
$c = Client::getInstance();
$request = $c->getMessageFactory()->createRequest('http://example.com', 'GET');
$res = $c->getMessageFactory()->createResponse();
// Make the request
$c->send($request, $res);
if($res->getStatus() === 200) {
echo $res->getContent();
No comments:
Post a Comment