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

Merge branch '117-dmoz-einbauen' into 'development'

Dmoz wieder eingebaut

Closes #117

See merge request !123
parents 900ca2b7 86b2ea16
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.
Finish editing this message first!
Please register or to comment