chrome-php/chrome — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a PHP Composer library that lets a PHP script start and control Chrome or Chromium in headless mode.

I want the user to be able to open a browser, create a page, go to a URL, wait for it to load, read the page title or run JavaScript, save screenshots, create PDFs, and simulate basic mouse and keyboard actions. Make the API feel simple and friendly for people using an IDE, with clear examples in the README.

Please include options for choosing the Chrome executable, using an environment variable for the Chrome path, turning headless mode off for debugging, setting window size, headers, proxy, user agent, image loading, timeouts, and logging. It should work with PHP 7.4 through current PHP versions and assume Chrome or Chromium is installed.

Add tests where reasonable, keep the code organized, and make sure browser processes are closed safely even when something fails.

Want more depth? Deep Reverse