Questions tagged [php-phantomjs]

PHP Library to load pages through PhantomJS

PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.

https://github.com/jonnnnyw/php-phantomjs

43 questions
19
votes
3 answers

how to Execute PhantomJS from PHP

I want to execute PhantomJS from PHP on localhost. Can any body explain how to execute PhantomJS from PHP and what package I should download from phantomjs.org?
MOB
  • 853
  • 2
  • 13
  • 28
12
votes
4 answers

Php-phantomjs with Laravel (File does not exist or is not executable: bin/phantomjs)

I'm trying to use php-phantomjs with Laravel 5 under CentOS 7 and Windows 8. I followed the instructions at PHP Phantom installation (installation done with success), after that I received this error while trying to execute the Basic Usage…
Zakaria Acharki
  • 66,747
  • 15
  • 75
  • 101
8
votes
1 answer

Installing PhantomJS on shared hosting (1and1)

Using 1and1 linux shared hosting, I have installed: PHP Version 7.0.27 PHP PhantomJS 2.1.1 PHP PhantomJS all values are null Whenever I make a request with: $client =…
Luc Laverdure
  • 1,398
  • 2
  • 19
  • 36
6
votes
1 answer

PHP-phantomjs, avoid page break

I am using the PHP-phantomjs and follow the doc I can output pdf and img. http://jonnnnyw.github.io/php-phantomjs/ but I have problem with page break. when a charts in the end of the page,but overflowed, it will be split in another page,like the…
JK.
  • 101
  • 7
4
votes
1 answer

[PHP-]PhantomJS - auto detecting height of page given height

I'm using PHP-PhantomJS to screenshot an array of URLs. I can't seem to figure out how to get away with not hardcoding the height of the screenshot being taken. I'd love to set a width and have the height of each page be auto-detected accordingly.…
Lauren F
  • 1,282
  • 4
  • 18
  • 29
3
votes
1 answer

How to execute Javascript in headless chrome using php-phantomjs?

I'm trying to run a headless browser and run JS scripts (a bot) within it using but want to run it using php. Searching on Google, I found a implementation / wrapper of PhantomJS as php-phantomjs. Please bear with me, I'm very new to this…
Sukanta Paul
  • 784
  • 3
  • 19
  • 36
3
votes
1 answer

Error when executing PhantomJS procedure in PHP-PhantomJS

I'm trying to use PHP Phantom with Laravel project on Ubuntu (php version > 5.5). Followed the installation steps mention here : http://jonnnnyw.github.io/php-phantomjs/ . I'm getting the following error: Error when executing PhantomJs procedure -…
Chirag
  • 567
  • 5
  • 20
3
votes
2 answers

PHP PhantomJS doesn't work on web server

Have the next problem: installed php phantomjs on MAMP. Made all using instructions from here: enter link description here Everything is ok... Then i copied all my site files to my web hosting site folder and nothing worked. Made a var_dump of…
2
votes
1 answer

browsing pages behind login system php-phantomjs

Scenario : I have a target website that I need to crawl and take a screenshot of the personal account feed. Needs : Login to the website. Browse to the personal area. crawl the page. Code : require 'vendor/autoload.php'; use…
Faxsy
  • 351
  • 1
  • 4
  • 17
2
votes
1 answer

Correct Way to Pass Script to PhantomJS via PHP-PhantomJS?

I'm learning PhantomJS and PHP-PhantomJS. I want to pass a script to PhantomJS. Currently I'm trying this: $client->getEngine()->addOption('/Applications/myWebApp/js/phantomtest.js'); $request =…
VikR
  • 4,818
  • 8
  • 51
  • 96
2
votes
2 answers

How to get data from phantomJS in PHP

I have a custom phantomJS procedure which I am calling with the PhantomJS PHP Library. Witht his procedure I want to load the content and extract some information of the rendered page. The exectration works fine when calling the procedure from…
rakete
  • 2,953
  • 11
  • 54
  • 108
2
votes
1 answer

PHP-PhantomJS renders screenshots on different servers differently

Today I've been working on a solution to generate website screenshots for one of my projects. After diving into various topics on the net I came to the conclusion that using PhantomJS was probably my best choice. Since I was running a vagrant…
Joshua - Pendo
  • 4,331
  • 6
  • 37
  • 51
2
votes
1 answer

Can't use PHP-Phantomjs

I'm trying to use PhantomJS, this is my code : getMessageFactory()->createRequest(); $response…
Antoine Duval
  • 342
  • 3
  • 20
1
vote
0 answers

PhantomJS Cannot Render Page but Others Work

I am trying to render this page (https://www.olx.co.id/item/kost-murah-di-jatipadang-poncol-tb-simatupang-jaksel-iid-523802059). However it does not work. FYI, I can render the other site perfectly. Here is my code. $client =…
Raden Bagus
  • 314
  • 4
  • 14
1
vote
0 answers

phantomjs returns empty content from a certain website

There is one state website gov.kz. I want to take information from there and paste it into my project so that all the information about the state service will be on one convenient place. Previously, the state site was on a different domain and…
1
2 3