public function __construct() { parent::__construct(); $this->save_links = true; /* $this->parse_links(); */ if ($this->save_links) { $this->save_data(); } else { $this->parse_links(); } }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.docmorris.de/search?query=%s&t='; $domain = substr(self::URL, 0, -1); $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); // $v="10333719"; foreach ($pzns as $v) { $content = $this->get_content(sprintf($search_url, $v)); $headers = $this->getResponseHeaders(); if (isset($headers['Location'])) { $Location = $headers['Location']; var_dump($Location); $this->products_url[] = ['link' => $Location, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.europa-apotheek.com/search.go?q='; $domain = substr(self::URL, 0, -1); // $v="10333719"; foreach ($pzns as $v) { $content = $this->get_content($search_url . $v); $search = $content->find('.search-result', 0); if ($search && ($a = $search->find('a', 0))) { $href = $a->getAttribute('href'); var_dump($href); $this->products_url[] = ['link' => $href, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.delmed.de/search.html?searchtext=%s&searchfield_submit=1'; $domain = substr(self::URL, 0, -1); $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); foreach ($pzns as $v) { $content = $this->get_content(sprintf($search_url, $v)); if (!$content) { continue; } $product = $content->find('.product__box', 0); if ($product && ($a = $product->find('a', 0))) { $href = $a->getAttribute('href'); var_dump($href); $this->products_url[] = ['link' => $href, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'http://www.juvalis.de/index.php?auswahl=shopseite&aktion=Suche&rubrik3=&rubrik4=&Sprachzeile=deutsch&Portoland=&ue=&up=&suchart=&filter=&abdaDarreichung=&aA=&agb=&std_search=1&ff_sortstring=&filterHersteller=&ppp=10&usernummer=31077793-508715925&rubrik1=Suche&rubrik3=&rubrik4=&rubrik2='; $domain = substr(self::URL, 0, -1); $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); $v = "10333719"; // foreach ($pzns as $v) { $content = $this->get_content(sprintf($search_url, $v)); $headers = $this->getResponseHeaders(); if (isset($headers['Location'])) { $Location = self::URL . $headers['Location']; var_dump($Location); $this->products_url[] = ['link' => $Location, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } // } // $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.eu-versandapotheke.com/search/result?term=%s&row=0&order_by=Relevance&order_direction=DESC'; $domain = substr(self::URL, 0, -1); $this->setOpt(CURLOPT_SSL_VERIFYPEER, false, $this->curl); $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); $this->setOpt(CURLOPT_SSL_VERIFYPEER, false, $this->curl); // $v="10333719"; foreach ($pzns as $v) { $content = $this->get_content(sprintf($search_url, $v)); $headers = $this->getResponseHeaders(); if (isset($headers['Location'])) { $Location = $domain . $headers['Location']; var_dump($Location); $this->products_url[] = ['link' => $Location, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.aponeo.de/suche/?q='; $domain = substr(self::URL, 0, -1); $this->setOpt(CURLOPT_SSL_VERIFYPEER, false, $this->curl); $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); $this->setOpt(CURLOPT_SSL_VERIFYPEER, false, $this->curl); foreach ($pzns as $v) { $content = $this->get_content($search_url . $v); $headers = $this->getResponseHeaders(); if (isset($headers['Location'])) { $Location = $headers['Location']; var_dump($Location); $this->products_url[] = ['link' => $Location, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } else { // var_dump($headers); // var_dump("Pzn: $v"); // throw new Exception("Location is not set"); } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'http://www.apo-rot.de/index_search.html?_formname=searchform&_errorpage=%2Findex.html&_command=SearchReroute&' . '_validation=34353434&_filterfastsearch2=x&_filteronlyInMenu=x&_filteravgrank=x&_filternolimits=x' . '&_filterfixedrankgroup=x&_filtersearchkat=&_filterktext='; $domain = substr(self::URL, 0, -1); foreach ($pzns as $v) { $content = $this->get_content($search_url . $v); $box = $content->find('.p_box', 0); if ($box) { $a = $box->find('a', 0); $href = $domain . $a->getAttribute('href'); var_dump($href); $this->products_url[] = ['link' => $href, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'http://www.besamex.de/keywordsearch/~sortBy=default'; // foreach ($pzns as $v) { $this->setOpt(CURLOPT_FOLLOWLOCATION, true, $this->curl); $this->setOpt(CURLOPT_MAXREDIRS, 10, $this->curl); $this->setCookie('JSSESSIONID', '79A021E182772A752875603B56F3AFE6-memc0.pla1tom2'); $this->setReferrer('http://www.besamex.de'); $v = 'IBU LYSIN'; $get = $this->post($search_url, ['VIEW_SIZE' => 10, 'SEARCH_STRING_CONTENT' => $v, 'SEARCH_REQUIRED_PID' => '', 'searchType' => 'lucene', 'searchTypeH' => 'keyword', 'SEARCH_CATEGORY_ID' => '', 'SEARCH_OPERATOR' => 'AND']); $response = $this->getResponse(); $content = str_get_html($response); echo $content->outertext; // var_dump($this->getResponseHeaders()); // var_dump($this->getRequestHeaders()); /* $this->products_url[]=[ 'link' =>$href, 'position' => 0, 'kws' => '', 'from_link' =>'search' ]; */ // } // $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.aliva.de/keywordsearch/searchitem='; $domain = substr(self::URL, 0, -1); foreach ($pzns as $v) { $content = $this->get_content($search_url . $v); $box = $content->find('#productsList', 0); if ($box) { $a = $box->find('a', 0); $href = $a->getAttribute('href'); var_dump($href); $this->products_url[] = ['link' => $href, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } // var_dump($this->products_url); $this->save_data(); }
protected function search_pzn() { $pzns = parent::search_pzn(self::URL); $search_url = 'https://www.apotheke.de/advanced_search_result.php?keywords='; $domain = substr(self::URL, 0, -1); foreach ($pzns as $v) { $content = $this->get_content($search_url . $v); $box = $content->find('.product_listing_container', 0); if ($box) { $a = $box->find('a', 0); $href = $a->getAttribute('href'); var_dump($href); $this->products_url[] = ['link' => $href, 'position' => 0, 'kws' => '', 'from_link' => 'search']; } } $this->save_data(); }