I have downloaded phantomjs library and created a test.js file inside bin folder and wrote some code and execute it using command prompt it works great so far so good But I am required to call this test.js file from a php file The problem is including test.js file like below is not enough

<script src="phantom/bin/test.js"></script>

Because it doesnt works without phantomjs.exe
I dont know how to incude or execute phantomjs.exe I mean how to use test.js and phantomjs.exe together

The more I read at http://phantomjs.org/ the more your question sounds incomplete.

PhantomJS is a headless web browser scriptable with JavaScript. It runs on Windows, macOS, Linux, and FreeBSD.

So if you want to call up some script from PHP, well, you would research that with something like https://www.google.com/search?q=php+run+javascript&gl=US but that would only run the script and not PhantomJS.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.