Jump to content

Assistance Parsing Multiple links using DOM


Recommended Posts

Thanks to Zane I am to where I am now. But I need some more help.

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


$html = file_get_dom('http://steamcommunity.com/profiles/76561198010758659/games?tab=all');
echo $html('div#game_440 h5', 0)->getPlainText();


Now I need the code to parse from multiple links, instead of using one link like it does now

I would like to be able to post the links, one per line and have it figure it out

If I could have it grab the links from a text file, it would be even better.


I finally, also would like to output the link of which the parsed details came from with the parsed details.

Link to comment
Share on other sites

Thanks for the help, but I am a serious n00b when it comes to this, so I am not sure how to do either.

I have been researching for a while on these subjects but I find the documentation to be extremely low with the things I am tryin to do


If someone could post examples that work, I could probably get them to work eventually. I just can't find any examples...

I don't want to ask for someone to do the work, but if it is simple and would not take time, I would be appreciative of the help.

Link to comment
Share on other sites

foreach ($lines as $line_num => $line) {
    echo "" . htmlspecialchars($line) . "<br />\n";


So, I found some code that can parse my txt file, but now I can't figure out how to make this post the links AND the times from my first code.

Also, I can't figure out how to use the things parsed in my first code. I am stuck, anyone helping would be awesome

Any assistance is appreciated.

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.