How to get content from external websites by class name

Discussion in 'JavaScript' started by Philip C. Ngo, Dec 15, 2013.

  1. #1
    I am trying to get the contents from span, class, div from external other domain to my personal website by class name For example:

    I need to a table from external website that has a class called .table that to Be updated once per minute, how to Import it in my website automatically the table hasn't API and XML ,RSS just it is a simple html website .
     
    Last edited: Dec 15, 2013
    Philip C. Ngo, Dec 15, 2013 IP
  2. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #2
    HuggyStudios, Dec 15, 2013 IP
  3. programmer_best1

    programmer_best1 Well-Known Member

    Messages:
    282
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    133
    #3
    use any programming language to grab the source code of the page and then use Dom Parser to get the content of a div
    search for a "Dom parser" and you will get exactly what you looking for : )
     
    programmer_best1, Jan 9, 2014 IP
  4. Philip C. Ngo

    Philip C. Ngo Member

    Messages:
    85
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Dear friend tnx a lot which source code for PHP is better to grab content Do you think?

    I hear curl libraries or file_get content is most common methods ,that's True .
     
    Philip C. Ngo, Jan 9, 2014 IP
  5. kutchbhi

    kutchbhi Active Member

    Messages:
    130
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    70
    #5
    use php-curl to get source code, then use querypath to parse
     
    kutchbhi, Jan 14, 2014 IP