Answer the question
In order to leave comments, you need to log in
Why is PHP PhantomJS not working?
The problem is this: installed php phantomjs on MAMP. I did everything according to the instructions from here
. Everything was installed and working well ... Then I copied the files from my hosting and everything stopped working. I did a var_dump of the 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 }
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();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question