|
|
@@ -3,8 +3,8 @@
|
|
|
<channel>
|
|
|
<title>PHP PhantomJs</title>
|
|
|
<description>Run PhantomJS scripts through PHP</description>
|
|
|
- <link>/</link>
|
|
|
- <atom:link href="/feed.xml" rel="self" type="application/rss+xml" />
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/</link>
|
|
|
+ <atom:link href="http://jonnnnyw.github.io/php-phantomjs/feed.xml" rel="self" type="application/rss+xml" />
|
|
|
|
|
|
<item>
|
|
|
<title>Introduction</title>
|
|
|
@@ -53,7 +53,7 @@ code etc.</li>
|
|
|
|
|
|
<div class="highlight"><pre><code class="language-bash" data-lang="bash">composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
|
|
|
|
|
|
-<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
|
|
|
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">installation</a> documentation.</p>
|
|
|
|
|
|
<h2 id="basic-usage">Basic Usage</h2>
|
|
|
|
|
|
@@ -106,12 +106,12 @@ code etc.</li>
|
|
|
<span class="c1">// Send the request</span>
|
|
|
<span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
|
|
|
|
|
|
-<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
|
|
|
+<p>For more detailed examples see the <a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
|
|
|
|
|
|
</description>
|
|
|
<pubDate>Mon, 28 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/introduction.html</link>
|
|
|
- <guid isPermaLink="true">/introduction.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/introduction.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/introduction.html</guid>
|
|
|
</item>
|
|
|
|
|
|
<item>
|
|
|
@@ -129,21 +129,21 @@ code etc.</li>
|
|
|
<p>Create a <code>composer.json</code> file in the root of your project:</p>
|
|
|
|
|
|
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;require&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;jonnyw/php-phantomjs&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;3.*&quot;</span>
|
|
|
- <span class="p-Indicator">},</span>
|
|
|
- <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
|
|
|
- <span class="p-Indicator">},</span>
|
|
|
- <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
|
|
|
- <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
|
|
|
- <span class="p-Indicator">],</span>
|
|
|
- <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
|
|
|
- <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
|
|
|
- <span class="p-Indicator">]</span>
|
|
|
- <span class="p-Indicator">}</span>
|
|
|
- <span class="p-Indicator">}</span></code></pre></div>
|
|
|
+ <span class="s">&quot;require&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
+ <span class="s">&quot;jonnyw/php-phantomjs&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;3.*&quot;</span>
|
|
|
+ <span class="p-Indicator">},</span>
|
|
|
+ <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
+ <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
|
|
|
+ <span class="p-Indicator">},</span>
|
|
|
+ <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
+ <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
|
|
|
+ <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
|
|
|
+ <span class="p-Indicator">],</span>
|
|
|
+ <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
|
|
|
+ <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
|
|
|
+ <span class="p-Indicator">]</span>
|
|
|
+ <span class="p-Indicator">}</span>
|
|
|
+ <span class="p-Indicator">}</span></code></pre></div>
|
|
|
|
|
|
<p>It is important that you have the ‘scripts’ section shown above in your <code>composer.json</code> file as it will install the latest version of PhantomJS for your system to your project’s bin folder. It is recommended that you create a bin folder in the root of your project as this is where the PHP PhantomJS library will look for your PhantomJS executable. If you would prefer to use a PhantomJS executable in a custom location, see the <a href="#custom-installation">Custom Installation</a> section.</p>
|
|
|
|
|
|
@@ -155,18 +155,20 @@ code etc.</li>
|
|
|
|
|
|
<p>If you would prefer to use a custom install location for the PhantomJS executable, you simply need to tell the client where to find the executable file:</p>
|
|
|
|
|
|
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="x">use JonnyW\PhantomJs\Client;</span>
|
|
|
+<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
|
|
|
+
|
|
|
+ <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
|
|
|
|
|
|
-<span class="x"> $client = Client::getInstance();</span>
|
|
|
-<span class="x"> $client-&gt;setPhantomJs(&#39;/path/to/phantomjs&#39;);</span></code></pre></div>
|
|
|
+ <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
|
|
|
+ <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">setPhantomJs</span><span class="p">(</span><span class="s1">&#39;/path/to/phantomjs&#39;</span><span class="p">);</span></code></pre></div>
|
|
|
|
|
|
<p>If you would like composer to install the PhantomJS executable to a custom location when installing dependencies, set the bin dir location in your project’s <code>composer.json</code> file:</p>
|
|
|
|
|
|
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
- <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;/path/to/your/projects/bin/dir&quot;</span>
|
|
|
- <span class="p-Indicator">}</span>
|
|
|
- <span class="p-Indicator">}</span></code></pre></div>
|
|
|
+ <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
|
|
|
+ <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;/path/to/your/projects/bin/dir&quot;</span>
|
|
|
+ <span class="p-Indicator">}</span>
|
|
|
+ <span class="p-Indicator">}</span></code></pre></div>
|
|
|
|
|
|
<p>You will need to make sure that this directory exists and is writable by Composer before running the composer install.</p>
|
|
|
|
|
|
@@ -176,10 +178,12 @@ code etc.</li>
|
|
|
|
|
|
<p>This should install the correct PhantomJS executable for your system to the bin locaiton you defined in your <code>composer.json</code> file. As mentioned above, you will need to tell the client where to find your PhantomJS executable as it is not installed in the default location:</p>
|
|
|
|
|
|
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="x">use JonnyW\PhantomJs\Client;</span>
|
|
|
+<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
|
|
|
+
|
|
|
+ <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
|
|
|
|
|
|
-<span class="x"> $client = Client::getInstance();</span>
|
|
|
-<span class="x"> $client-&gt;setPhantomJs(&#39;/path/to/phantomjs&#39;);</span></code></pre></div>
|
|
|
+ <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
|
|
|
+ <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">setPhantomJs</span><span class="p">(</span><span class="s1">&#39;/path/to/phantomjs&#39;</span><span class="p">);</span></code></pre></div>
|
|
|
|
|
|
<h2 id="installing-from-tarball">Installing from tarball</h2>
|
|
|
|
|
|
@@ -199,8 +203,8 @@ code etc.</li>
|
|
|
<p>Make sure the components are in your include path and that the PhantomJS executable is installed to your projects bin folder as mentioned in the <a href="#custom-installation">Custom Installation</a> section.</p>
|
|
|
</description>
|
|
|
<pubDate>Sun, 27 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/installation.html</link>
|
|
|
- <guid isPermaLink="true">/installation.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/installation.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/installation.html</guid>
|
|
|
</item>
|
|
|
|
|
|
<item>
|
|
|
@@ -218,7 +222,7 @@ code etc.</li>
|
|
|
<li><a href="#custom-run-options">Custom Run Options</a></li>
|
|
|
</ul>
|
|
|
|
|
|
-<p>For more advanced customization or to load your own PhantomJS scripts, see the <a href="/advanced.html">advanced</a> documentation.</p>
|
|
|
+<p>For more advanced customization or to load your own PhantomJS scripts, see the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
|
|
|
|
|
|
<h2 id="basic-request">Basic Request</h2>
|
|
|
|
|
|
@@ -379,7 +383,7 @@ code etc.</li>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
-<p>If the response contains a status code of 0, chances are the request failed. Check the request <a href="https://github.com/jonnnnyw/php-phantomjs/blob/master/doc/debugging.rst">debug log</a> for more detailed information about what may have gone wrong.</p>
|
|
|
+<p>If the response contains a status code of 0, chances are the request failed. Check the request <a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">debug log</a> for more detailed information about what may have gone wrong.</p>
|
|
|
|
|
|
<h2 id="screen-captures">Screen Captures</h2>
|
|
|
|
|
|
@@ -499,8 +503,8 @@ code etc.</li>
|
|
|
<p>See the <a href="http://phantomjs.org/api/command-line.html">PhantomJS Documentation</a> for a full list of command line options.</p>
|
|
|
</description>
|
|
|
<pubDate>Sat, 26 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/usage.html</link>
|
|
|
- <guid isPermaLink="true">/usage.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/usage.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/usage.html</guid>
|
|
|
</item>
|
|
|
|
|
|
<item>
|
|
|
@@ -510,8 +514,8 @@ code etc.</li>
|
|
|
<p>In the meantime, check out the <a href="https://github.com/jonnnnyw/php-phantomjs/tree/master/examples">examples</a> in the Github repo.</p>
|
|
|
</description>
|
|
|
<pubDate>Fri, 25 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/advanced.html</link>
|
|
|
- <guid isPermaLink="true">/advanced.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/advanced.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/advanced.html</guid>
|
|
|
</item>
|
|
|
|
|
|
<item>
|
|
|
@@ -521,8 +525,8 @@ code etc.</li>
|
|
|
<p>In the meantime, check out the <a href="https://github.com/jonnnnyw/php-phantomjs/tree/master/examples">examples</a> in the Github repo.</p>
|
|
|
</description>
|
|
|
<pubDate>Thu, 24 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/debugging.html</link>
|
|
|
- <guid isPermaLink="true">/debugging.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/debugging.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/debugging.html</guid>
|
|
|
</item>
|
|
|
|
|
|
<item>
|
|
|
@@ -530,8 +534,8 @@ code etc.</li>
|
|
|
<description><p>This documentation page will be up in the next couple of days.</p>
|
|
|
</description>
|
|
|
<pubDate>Wed, 23 Jul 2014 00:00:00 +0100</pubDate>
|
|
|
- <link>/troubleshooting.html</link>
|
|
|
- <guid isPermaLink="true">/troubleshooting.html</guid>
|
|
|
+ <link>http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html</link>
|
|
|
+ <guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html</guid>
|
|
|
</item>
|
|
|
|
|
|
</channel>
|