I am looking to write some code that can extract all form elements from any webpage. I know how to get the page and am just reading up on preg_match, but before I get in too deep, I was wondering if anyone knew of any code snippets that could do this? The problem is the form elements are not always going to be written the same way due to different authors of different webpages. So one guy could have:
<input type=text name=field1 value=field_value>
another could have:
<Input type = "text" Value = "Field Value" Name = "Field One">
Etc...
Plus there are the "option" elements and all the other types...so any ideas?