设置Selenium PHP自动化

I am new to selenium, and I am attempting to set it up and run basic automation programs. I have downloaded the selenium jar file and have enabled the server through Terminal. Additionally, I have downloaded a PHP and selenium library from https://code.google.com/archive/p/php-webdriver-bindings/.

Here is the code I am attempting to run:

<?php

 require_once "phpwebdriver/WebDriver.php";
 require("phpwebdriver/LocatorStrategy.php");


 $webdriver = new WebDriver("localhost", "4444");
 $webdriver->connect("firefox");
 $webdriver->get("https://google.com");
 $element = $webdriver->findElementBy(LocatorStrategy::name, "q");
  if ($element) {
    $element->sendKeys(array("php webdriver") );
    $element->submit();
  }

 $webdriver->close();

?>

When I open the file via my local host through the Firefox browser, the page is blank. Any help in setting up selenium and running basic automation commands like this google search would be greatly appreciated!