There are problems checking external (relative to PHP) html pages, for example, for the presence of obscene expressions that a user can see in his browser window! For example, in the example.com/index.html page the code is embedded
Переменная1 = Нец Переменная2 = ензу Переменная3 = ра document.write(Переменная1+Переменная2+Переменная3); And see for yourself what happens - what the user sees!
What was studied before writing the question: 1. PhantomJS - gives the perfect picture in PDF, i.e. correctly renders the html page - but I do not have the opportunity to analyze the resulting PDF files. The page.content function in different versions:
var webPage = require('webpage'); var page = webPage.create(); page.open('http://www.phantomjs.org', function (status) { if (status !== 'success') { console.log(page.content); console.log('Unable to load the address!'); phantom.exit(); } else { window.setTimeout(function () { console.log(page.content); phantom.exit(); }, 20000); // Change timeout as required to allow sufficient time } }); It gives ONLY the ending of the html file, and since the documentation for PhantomJS is NO, I can’t do anything accordingly.
And the third to call phantomJS you need to create JS files, which also looks very crooked.
Please tell me how to achieve html reading after running Javascriptov inside PHP (freebsd) I need to get a string containing TEXT, LINKS to external objects (ie, URL) HTML formatting inside PHP.