Page 1 of 1

Is it possible to execute external javascript from PHP?

Posted: Mon Dec 20, 2010 4:07 pm
by deviantPsyche
Hi guys,

I ran into a problem with cURL recently. Basically I need my script to log into a site and then go to a page and get its content. cURL was able to accomplish this easily until I ran into a site that generates its content by calling javascript. I can see all the content I need in FireBug, because it shows DOM stuff that has been generated by javascript, but it seems that cURL does not support such functionality as executing javascript, its only for get and post.

So is it possible to integrate something within PHP that will first execute javascript code and then get the contents of the page?

Re: Is it possible to execute external javascript from PHP?

Posted: Mon Dec 20, 2010 7:40 pm
by requinix
You'd basically have to make a web browser.

What site and what content?