Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $DOM = new DOMDocument;
- $DOM->loadHTML($html);
- $inputs = $DOM->getElementsByTagName('input');
- $hiddenInputs = array();
- for ($i = 0; $i < $inputs->length; $i++){
- $item = $inputs->item($i);
- $type = $item->getAttribute('type');
- $name = $item->getAttribute('name');
- $value = $item->getAttribute('value');
- if($type == 'hidden'){
- $hiddenInputs[$name] = $value;
- }
- }
Add Comment
Please, Sign In to add comment