btherl Posted September 6, 2007 Share Posted September 6, 2007 Here is another approach: http://php-html.sourceforge.net/ This is a parser which will present you with each HTML tag in turn, and parse the attributes for you. Your parser can look like this: while ($parser->parse()) { if ($parser->iNodeType === NODE_TYPE_ELEMENT && $parser->iNodeName === 'input') { print "Attribute name of the input element is {$parser->iNodeAttributes['name']}\n"; } } I use this for most of my HTML extraction needs, such as google SERP, yahoo SERP and others. Quote Link to comment Share on other sites More sharing options...
shoaiblatif Posted September 6, 2007 Share Posted September 6, 2007 hi 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.