Some useful info on setting up a remote headless VPS so it can run selenium tests without using a headless browser.
Get started with using Selenium for automating tests, and writing those tests in PHP.