php
getEngine()->setPath('/path/to/phantomjs');
$request = $client->getMessageFactory()->createRequest('e.com', 'GET');
$response = $client->getMessageFactory()->createResponse();
$client->send($request, $response);
if ($response->getStatus() === 200) {
$screenshot = $client->getMessageFactory()->createScreenshot();
$client->send($screenshot);
file_put_contents('screenshot.png', $screenshot->getBinary());
}
顶一下
(0)
0%
踩一下
(0)
0%
- 相关评论
- 我要评论
-