Skip to content Skip to sidebar Skip to footer

File_get_contents While Bypassing Javascript Detection

I am trying to save a page as a PDF file, and to do so I am trying to read the content of that page then using a PDF library to create the file. The issue I am facing is that when

Solution 1:

The problem is that the site is doing javascript detection on the page you're trying to load meaning that's more than likely serving up a mostly blank document with noscript tags and script tag to load the rest of the content. You cannot bypass this with cURL the way you are trying. Instead you'll need a headless browser with a javascript engine. Selenium Web Driver is one such solution. I found this gist for you as well: https://gist.github.com/evandrix/3694955


Post a Comment for "File_get_contents While Bypassing Javascript Detection"