0

I need to save the source of a dynamically generated web page using curl. For instance if you go to www.eleqt.com and look at the source of that page, you will see that the html source is minimal compared to the client side generated html source. I have tried Crowbar, but without success.

Does anybody have any ideas on how to accomplish this?

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Alvin Bakker
  • 1,456
  • 21
  • 40
  • Check this: http://stackoverflow.com/questions/12450868/how-to-print-html-source-to-console-with-phantomjs – hek2mgl Feb 14 '14 at 15:42
  • Your question is pretty broad, but you have two main options. Option 1: Use curl to request the page and save the source. Option 2: If the script doing the saving is the same as the page that you are trying to save, use output buffering, then just save the contents before the script exits. – elixenide Feb 14 '14 at 17:58
  • @Ed. The javascript populates the page and I have to save the source after it was populated. So both options won't work. – Alvin Bakker Feb 14 '14 at 19:57
  • Got it. Any reason you can't send the client-side generated HTML back to the server using AJAX? Or, if you just want to save it locally to the client, using local storage or a cookie? – elixenide Feb 14 '14 at 19:59
  • I tried using phantomjs, but get stuck at sending cookies to that particular site. Phantomjs works fine with grabbing page content, only not for this site as it requires 21 hash coded cookies. So I think whatever I do I am not getting what I need... Thanx for your replies guys – Alvin Bakker Feb 19 '14 at 18:52

0 Answers0