Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Scraping

  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Thanked 0 Times in 0 Posts


    Hello every one,
    I am using PHP Scraping to get the page html. but there is a problem that the page is loaded through ajax that takes some time to load.The file_get_html() get the html before the file is loaded.what i can do to solve this problem.

    Please help me to solve this problem .

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 Posts
    You would write an javascript parser.
    PHP only cares about data. By scraping the page you get the html data, you need to write a way to parse the javascript to do what you want. If the link itself relies on JS to load it, then your only option is to parse it if you want to do something with it. I guarantee that it will not be fun to rewrite a javascript parser.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts