BASiQ Posted January 31, 2012 Share Posted January 31, 2012 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. Quote Link to comment Share on other sites More sharing options...
kicken Posted January 31, 2012 Share Posted January 31, 2012 Take the code you posted, and wrap it in a loop. Change your static URL to a variable and just assign a new url to that variable on each loop iteration. As for getting the url's from a file, look at the file() function. Quote Link to comment Share on other sites More sharing options...
BASiQ Posted January 31, 2012 Author Share Posted January 31, 2012 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. Quote Link to comment Share on other sites More sharing options...
BASiQ Posted January 31, 2012 Author Share Posted January 31, 2012 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.