A PHP client library for interacting with Chrome DevTools Protocol to automate and control Chrome/Chromium browsers.
Chrome DevTools Protocol PHP client is a library that allows PHP developers to interact with Chrome or Chromium browsers via the Chrome DevTools Protocol. It enables automation of browser tasks such as navigating to web pages, capturing screenshots, generating PDFs, and managing browser contexts programmatically from PHP code.
PHP developers who need to automate browser interactions for tasks like web scraping, automated testing, generating screenshots or PDFs from web pages, or controlling Chrome instances in headless mode.
It provides a native PHP interface to the Chrome DevTools Protocol, simplifying browser automation without requiring external tools or deep protocol expertise, and includes features like isolated browser contexts and timeout management.
Chrome Devtools Protocol client for PHP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides an object-oriented API that abstracts the raw DevTools Protocol, making it straightforward for PHP developers without deep protocol knowledge, as shown in the basic usage example with Context and Launcher classes.
Supports headless browser contexts with separate cookies and storage, ideal for parallel sessions or data isolation, as detailed in the headless contexts section of the README.
Includes context-based timeout handling to prevent hanging operations, demonstrated with Context::withTimeout in the code examples for reliable automation.
Can connect to already running Chrome instances via host and port, allowing control without spawning new processes, as shown in the 'Using an already running Chrome browser' example.
Limited to Chrome or Chromium browsers, making it unsuitable for projects that require automation across multiple browser engines.
Requires explicit launching and closing of Chrome processes with try-finally blocks, which can lead to resource leaks if not handled carefully, as seen in the basic usage code.
While it simplifies protocol access, advanced tasks may still require understanding low-level DevTools commands, and the README lacks extensive examples for complex scenarios.