Skip to content
Snippets Groups Projects
Commit 86b2ea16 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Dmoz wieder eingebaut

parent 900ca2b7
No related branches found
No related tags found
2 merge requests!127Development,!123Dmoz wieder eingebaut
......@@ -15,22 +15,32 @@ class Dmoznebel extends Searchengine
public function loadResults ($result)
{
$title = "";
$link = "";
$anzeigeLink = $link;
$descr = "";
$result = mb_convert_encoding($result, "UTF-8", "ISO-8859-1");
$results = trim($result);
foreach( explode("\n", $results) as $result )
{
$res = explode("|", $result);
if(sizeof($res) < 3)
{
continue;
}
$title = $res[1];
$link = $res[2];
$anzeigeLink = $link;
$descr = $res[3];
die($result);
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment