use JonnyW\PhantomJs\Client;
public static function getByPhantomJs(string $url): string
{
$content = '';
$client = Client::getInstance();
$client->getEngine()->setPath('models/phantomjs');
$request = $client->getMessageFactory()->createRequest($url, 'GET');
$response = $client->getMessageFactory()->createResponse();
$client->send($request, $response);
if ($response->getStatus() === 200) {
$content = $response->getContent();
}
return $content;
}