// Получить запрос
    $queries = $db->getAll(CMD_SEL_QUERIES, array(), DB_FETCHMODE_ASSOC);
    if (PEAR::isError($queries)) {
        print $queries->getMessage();
        exit;
    }
    if (!isset($queries) || sizeof($queries) == 0) {
        print "All data is processed.\n";
        exit;
    }
    var_dump($queries);
    $parser =& new ResearchGrabber();
    $parser->waitBeforeRequest = WAIT_BEFORE_REQUEST;
    // Загрузка страницы с формой
    $startContent = $parser->loadPage($baseUrl);
    $params = FormParser::parseParams($startContent);
    if (PEAR::isError($params)) {
        print $params->getMessage();
        exit;
    }
    var_dump($params);
}
exit;
$parser->proxyService = $proxyService;
$parser->setProxyData($res);
var_dump($parser);
exit;
// Обработка запросов
if ($queries == null) {
    processItems();
} else {
Esempio n. 2
0
 public function stepBrut($form)
 {
     $Curl = $this->Curl;
     $Curl->host = $this->host;
     $Curl->cookies = $this->cookies;
     $Curl->referer = $this->form_url;
     $Curl->submitform($this->form_url, $form);
     $Curl->setcookies();
     $this->setCookies($Curl->cookies);
     $FormParser = new FormParser();
     if ($FormParser->Parsing($Curl->resultsform)) {
         $form = $FormParser->Parsing($Curl->resultsform);
         $form['eeee'] = 444;
         $this->setForm($form);
     }
     $this->html = $Curl->results;
     $this->headers = array_map('trim', $Curl->headers);
     $this->response_code = trim($Curl->response_code);
 }
Esempio n. 3
0
 public function testGetLabelsReturnsAllLabels()
 {
     $expected = ['firstname' => 'Your first name', 'lastname' => 'Your last name', 'email' => 'Email', 'message' => 'Your message'];
     $fp = new FormParser($this->testDir . 'contact-form.php');
     $this->assertEquals($expected, $fp->getLabels());
 }