开发者

How can I get headers of the URL from chrome-php

I am using chrome-php I want to get the header from the response Is there any way I can get it? Here is how I am trying to implement the functionality ...

$browserFactory = new BrowserFactory('chromium-browser');

// starts headless chrome
$browser = $browserFactory->createBrowser([
    'noSandbox' => true,
    'debugLogger' => 'php:/开发者_JAVA技巧/stdout',
]);

try {
            
    $page = $browser->createPage();
    $page->navigate($url)->waitForNavigation();

    info([$page->getHtml()]);

finally {
    $browser->close();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜