Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Forms
- while(1) {
- preg_match_all('/\<form.*?\>/i', $content, $forms);
- if(sizeof($forms) == 0) { break; }
- $forms = $forms[0];
- $attributes = array('action', 'id', 'method', 'name');
- for($i = 0; $i < sizeof($forms); $i++) {
- $response['forms'][$i] = array();
- foreach($attributes as $attribute) {
- preg_match('/' . $attribute . '=(\"|\')(.*?)?(\"|\')/i', $forms[$i], $attributeMatch);
- if(sizeof($attributeMatch) == 0) { continue; }
- $response['forms'][$i][$attribute] = $attributeMatch[2];
- }
- }
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement