title: "Run" HTMLUnit with PHP
body: <p>So I have installed Java on my CentOS server.  I now want to be able to use PHP to run HTMLUnit to get a fully rendered webpage and then return the results to the user.</p>
  
  <p>I see the "simple" example on HTMLUnit but I know next to nothing about Java and don't know where that needs to go or be ran to even get the test case working (i.e. getting Google's homepage).</p>
  
  <pre><code>public void getURL() throws Exception {
      final WebClient webClient = new WebClient();
      final HtmlPage page = webClient.getPage("http://google.com"); // Pass in URL
  
      // RETURN "page"
  }
  </code></pre>
  
  <p>Once the test is working I would need to be able to "pass" in the desired URL and then "capture" the output.</p>
  
  <p>So far Googling as me running in circles.  Does anyone have a link to a simple example, and then pointers on how to integrate it with PHP?</p>
  
  <p>Thanks!</p>