The problem is this: installed php phantomjs on MAMP. I did everything according to the instructions from here: enter the description of the link here
Everything was installed and working well ... Then I copied my hosting files and everything stopped working. Made var_dump server response, as I understand it, and got the following:
object (JonnyW \ PhantomJs \ Http \ Response) # 156 (8) {["headers"] => NULL ["status"] => NULL ["content"] => NULL ["contentType"] => NULL [" url "] => NULL [" redirectURL "] => NULL [" time "] => NULL [" console "] => NULL}
Why it may not work, and actually all returned values are 0? My code is below:
require __DIR__ . '/vendor/autoload.php'; use JonnyW\PhantomJs\Client; $client = Client::getInstance(); $request = $client->getMessageFactory()->createRequest('http://jonnyw.me', 'GET'); $response = $client->getMessageFactory()->createResponse(); var_dump($response); $client->send($request, $response); echo $response->getContent();