phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

How to parse html page and get env variables? #28

Closed tconnery closed 11 years ago

tconnery commented 11 years ago

I am trying to use php to retrieve a html page via curl

Is there a way to execute the whole html page & JS of the curl response via v8js so you can get access to the env variables? of the page?

andrewtch commented 11 years ago

It's not a headless browser, it's a js embedded in php.

To emulate full browser stack you need to parse the page, extract all javascripts and execute them emulating all DOM js methods.

This task should be, imho, closed since the goal of the library isn't a creation of headless browser )