Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Assistance Parsing Multiple links using DOM

    I have this code which parses out a div from within the page gotten. Works great.

    Code:
    $html = file_get_dom('http://steamcommunity.com/profiles/76561198010758659/games?tab=all');
    echo $html('div#game_440 h5', 0)->getPlainText();
    but I need the code to parse from multiple links, instead of using one link like it does now. I would like these multiple links to be called from a text file.

    How would I go about this? I know about the file() function. but I have no idea how to use it. The examples are all wrong

  • #2
    Senior Coder
    Join Date
    Jul 2011
    Posts
    1,226
    Thanks
    3
    Thanked 171 Times in 171 Posts
    Steam has an API that can do all this for you if I remember right? I would look at it if I were you.
    Useful function to retrieve difference in times
    The best PHP resource
    A good PHP FAQ
    PLEASE remember to wrap your code in [PHP] tags.
    PHP Code:
    // Replace this
    if(isset($_POST['submitButton']))
    // With this
    if(!empty($_POST))
    // Then check for values/forms. Some IE versions don't send the submit button 
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.


  •  

    Posting Permissions

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