Answer the question
In order to leave comments, you need to log in
How to get JavaScript results in php?
Using php I send data to the form of someone else's site. It checks the data with javascript and gives errors. How can I get these errors?
If you need to use a framework, tell me exactly how (I have not worked with frameworks before). Thanks everyone for the good replies.
Answer the question
In order to leave comments, you need to log in
XMLHttpRequest . In jQuery ajax() . There are similar ones in other libraries.
You will have to somehow emulate the work of the JavaScript engine. No other way.
Javascript is not being executed on someone else's site. It runs on the client.
You can call PhantomJS via the command line and parse the response, or use some php.net/manual/ru/book.v8js.php. But these are all crutches.
If you are writing a parser, think about where the remote server script itself gets the data to generate content from. He generates them on his own or requests them from somewhere in the backend. If the latter, it would be more correct to intercept the original data (before display) and not bother with JS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question