help_me_with_php Posted March 23, 2013 Share Posted March 23, 2013 hello everyone, this isn't really a coding question but couldn't find a forum for it. here is a webpage I would love to parse out and get only the relevant information out of it: http://php.net/quickref.php does anyone here know of any good tools to do such a thing? basically what I'm looking for is a parser, essentially. I can write a script in windows and use the client side coding to find the script text that I was to single out but that would take quite a bit of work by hand. has anyone done this kind of thing before? Quote Link to comment https://forums.phpfreaks.com/topic/276040-parsing-the-php-web-reference-site/ Share on other sites More sharing options...
requinix Posted March 23, 2013 Share Posted March 23, 2013 You want a list of functions? Load up the page in DOMDocument, getElementById() for "quickref_functions" (it's a UL), and from that a getElementsByTagName() with "a" to get all the links. Then loop over that list. Quote Link to comment https://forums.phpfreaks.com/topic/276040-parsing-the-php-web-reference-site/#findComment-1420431 Share on other sites More sharing options...
help_me_with_php Posted March 23, 2013 Author Share Posted March 23, 2013 You want a list of functions? Load up the page in DOMDocument, getElementById() for "quickref_functions" (it's a UL), and from that a getElementsByTagName() with "a" to get all the links. Then loop over that list. thanks so much for your help. I don't think I communicated clearly. "What I want to do is get some extracted information from the pages that are pointed to by each of those links. does that make sense? so that page is not what I'm after...it's the content on all of the linked pages that I'm after. all of the pages look the same so it shouldn't be too difficult. I guess the question is more or less, do I have any other tools to work with besides programming in a languages of my choice and just using the DOM document model? thanks. Quote Link to comment https://forums.phpfreaks.com/topic/276040-parsing-the-php-web-reference-site/#findComment-1420434 Share on other sites More sharing options...
requinix Posted March 23, 2013 Share Posted March 23, 2013 Reflection is a lot easier to use. Grab the list of functions and use reflection to get information about them. That can get you pretty much anything you might want. Quote Link to comment https://forums.phpfreaks.com/topic/276040-parsing-the-php-web-reference-site/#findComment-1420438 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.