tags:

views:

53

answers:

2

i need to get contents on web page and read it via cURL on php,but contents not include data on javascript any body can help me to solve this problem ?

A: 

Have you tried file_get_contents?

frietkot
yes, I tried already, but now work.
KOKARAT
+1  A: 

Not possibel. A web page with embedded JavaScript is actually a program. CURL gives you the program's source code (HTML and JavaScript), but doesn't run that program. To run a page's embedded JavaScript you need (1) a JavaScript interpreter, and (2) the Document Object Model (DOM) for the page. Browsers have these, but PHP does not. People are working on PHP versions of these, but developing these are big tasks. If this is what you need, you might skip PHP and instead look at writing C++ code using WebKit.

Asif Mulla
Ok, many thanks.
KOKARAT