How to disguise a "headless" browser (PHP,Nesk\Puphpeteer)?

Doing a simple test
use Nesk\Puphpeteer\Puppeteer;
use Nesk\Rialto\Data\JsFunction;
use Nesk\Puphpeteer\Resources\ElementHandle;
$puppeteer=new Puppeteer();
$html_page->setUserAgent('Opera/9.80 (Windows NT 6.2; WOW64) Presto/2.12.388 Version/12.17');
$content=$html_page->evaluate(JsFunction::createWithBody('return document.documentElement.outerHTML'));
echo $content;

This service shows me "Your browser is Headless Chrome 77.0" how to adjust to this service have shown that supposedly came from the browser, but not so obvious that the script is running?
March 25th 20 at 13:44
1 answer
March 25th 20 at 13:46
I have Puphpeteer and then as I understand the extension for the puppeteer, that is
puppeteer - for nodejs
Puphpeteer for php

That is, as I understand this extension I will not do, or how to use it?
I just don't see consistency in the use of this material, that is, as this is all I can associate and use in php... - clara30 commented on March 25th 20 at 13:49
I found there in the instructions, and here's how it
const puppeteer = require("puppeteer-extra")
// add the stealth plugin and use defaults (all evasion techniques)
const pluginStealth = require("puppeteer-extra-plugin-stealth")
puppeteer.launch({ headless: true }).then(async browser => {
 const page = await browser.newPage()
 await page.setViewport({ width: 800, height: 600 })
 await page.goto("")
 await page.waitFor(5000)
 await page.screenshot({ path: "testresult.png", fullPage: true })
 await browser.close()

to use in php I'll never know... - clara30 commented on March 25th 20 at 13:52
Puphpeteer is a wrapper for the puppeteer - Granville commented on March 25th 20 at 13:55
@Granville, tell me how to connect the above written will look like in php?
So I installed it but in php this thing to connect? - clara30 commented on March 25th 20 at 13:58
@clara30, can be done in various ways.
For example, to raise the micro service to Node.js that you can pull from PHP via HTTP.
You can also pull through exec. Here as You prefer - Granville commented on March 25th 20 at 14:01
@clara30, no - Earnest_Kerlu commented on March 25th 20 at 14:04
@Granville, you can detail how it's done, examples, links?
As I understand this module you just need the right connect. - clara30 commented on March 25th 20 at 14:07
@clara30, as I wrote above, will have to deal with Node.js
Sorry, there are no references and examples where you solved Your task.
"more" here would be tantamount to the implementation of this functionality is you - Granville commented on March 25th 20 at 14:10
@Granville, Maybe you can just separate module to plug in, in this case the puppeteer-extra? the type of use ....... or not enough? - clara30 commented on March 25th 20 at 14:13

Find more questions by tags PHP