Download the zip package, unzip it, and copy the executable to a system directory in which webshot can look for the PhantomJS executable.
1 2 3
The version number of PhantomJS.
The base URL for the location of PhantomJS binaries for
download. If the default download site is unavailable, you may specify an
alternative mirror, such as
Install PhantomJS even if the version installed is the latest or if the requested version is older. This is useful to reinstall or downgrade the version of PhantomJS.
This function was designed primarily to help Windows users since it is
cumbersome to modify the
PATH variable. Mac OS X users may install
PhantomJS via Homebrew. If you download the package from the PhantomJS
website instead, please make sure the executable can be found via the
On Windows, the directory specified by the environment variable
APPDATA is used to store ‘phantomjs.exe’. On OS X, the directory
‘~/Library/Application Support’ is used. On other platforms (such as
Linux), the directory ‘~/bin’ is used. If these directories are not
writable, the directory ‘PhantomJS’ under the installation directory of
the webshot package will be tried. If this directory still fails, you
will have to install PhantomJS by yourself.
If PhantomJS is not already installed on the computer, this function will
attempt to install it. However, if the version of PhantomJS installed is
greater than or equal to the requested version, this function will not
perform the installation procedure again unless the
force parameter is
TRUE. As a result, this function may also be used to reinstall or
downgrade the version of PhantomJS found.
NULL (the executable is written to a system directory).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.