I want to parse the HTML code from a webpage with PHP Curl, but there is an error msg that I can't access the site without JavaScript.
Can I enable JavaScript with PHP Curl?
I want to parse the HTML code from a webpage with PHP Curl, but there is an error msg that I can't access the site without JavaScript.
Can I enable JavaScript with PHP Curl?
No.
This is simple like this - a page tests, if you have JavaScript enabled, by using the JavaScript to execute a command, that will remove things like "you don't have JavaScript enabled".
Therefore, if you do NOT have JS enabled, the error won't go away.
Optionally (and even more likely) the JavaScript will REDIRECT your browser to the actual page, if JS is not enabled - again, you will stay at the first page, which says you don't have JS enabled...
PHP curl is NOT a full browser. It is just a library that is used for communicating with servers, using HTTP, FTP, et cetera. It does not do neither rendering nor parsing.
For this functionality, you would need a JavaScript engine... to my knowledge there is not one in PHP that is fully functional.