Comments (4)
for headers you might to use interception
from chrome.
Thank you. Could you point me in the right direction? I have looked into the code but I don't see where I should "intercept".
from chrome.
This issue has been automatically marked as stale because there has been no recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.
from chrome.
I messed around with this for a bit, and dug through the source trying to figure it out. I wasn't able to set the headers on the initial connection, but I was able to set them on the page instance. I think setting it on the initial connection would make the most sense, and I am unsure if subsequent page requests would retain the headers or not.
$page = $browser->createPage();
$page->getSession()->sendMessageSync(new Message('Network.setExtraHTTPHeaders', [
'headers' => [
'Accept-Encoding' => 'identity',
'Accept-Language' => 'en-US,en;q=0.9',
]
]));
$page->navigate($url);
I haven't worked with chromium much, so maybe someone more familiar with it and this project might have a better way.
from chrome.
Related Issues (20)
- Running chrome-php inside a Docker Container: Permission denied HOT 1
- Fatal error: Uncaught RuntimeException: Chrome process stopped before startup completed. Additional info: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitte HOT 2
- How to record audio? HOT 2
- Support for PHP 8.3 HOT 3
- replace Communication\Connection::waitForDelay's usleep with select HOT 7
- waitUntilContainsElement with logical operator? HOT 2
- Persistent Browser Connection Issue: Stalling at chrome-php/Browser.php:84
- How to give margin from top in 2nd and next pages (not 1st page)
- [BUG] Chrome process stopped before startup completed. HOT 8
- [Bug]: PageLayoutMetrics::getResultData(): Return value must be of type array, null returned HOT 2
- command not (always?) available in shell_exec HOT 1
- How to get Request Headers? HOT 1
- Print on MacOs using php local server: timeout HOT 2
- PHP is not a snap cgroup (Chromium) HOT 4
- It tells "<noscript>You need to allow this site to execute JavaScript</noscript>" HOT 8
- How to disable userDataDir and userCrashDumpsDir ? HOT 1
- Cannot print CSS style "background" HOT 1
- How to get the asynchronous response result of the specified URL? HOT 1
- Redirects and difference between headless on and off HOT 4
- Timeout for loading dynamic content HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome.