Commit 710d5077 authored by Dominik Hebeler's avatar Dominik Hebeler

Ergebnisse werdne nun auch ausgegeben

parent 3ee6da21
......@@ -78,9 +78,18 @@ class MetaGerSearch extends Controller
$searchengines = Search::loadSearchEngines($request);
$results = new Results($searchengines);
return view('results');
$viewResults = [];
# Wir extrahieren alle notwendigen Variablen und geben Sie an unseren View:
foreach($results->results as $result)
{
$viewResults[] = get_object_vars($result);
}
return view('metager3')
->with('results', $viewResults);
return print_r($results->results, TRUE);
return print_r( $viewResults, TRUE);
}
}
\ No newline at end of file
......@@ -7,9 +7,9 @@ class Result
function __construct ( $titel, $link, $anzeigeLink , $descr )
{
$this->titel = $titel;
$this->link = $link;
$this->anzeigeLink = $anzeigeLink;
$this->descr = $descr;
$this->titel = trim($titel);
$this->link = trim($link);
$this->anzeigeLink = trim($anzeigeLink);
$this->descr = trim($descr);
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ class Results
function __construct ($engines)
{
$this->results[] = $this->loadResults($engines);
$this->results = $this->loadResults($engines);
}
private function loadResults($engines)
......
......@@ -14,7 +14,7 @@ class Fastbot extends Searchengine
public function loadResults ()
{
$result = curl_multi_getcontent($this->ch);
$result = utf8_encode(curl_multi_getcontent($this->ch));
foreach( explode("\n", $result) as $line )
{
$line = trim($line);
......@@ -33,5 +33,6 @@ class Fastbot extends Searchengine
}
}
}
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ return [
|
*/
'debug' => env('APP_DEBUG', false),
'debug' => env('APP_DEBUG', true),
/*
|--------------------------------------------------------------------------
......
......@@ -61,7 +61,7 @@
<div class="tab-pane active" data-focus="web" id="web" role="tabpanel">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
......
@extends('layouts.resultPage')
@section('results')
@foreach($results as $result)
<div class="result">
<div class="number" style="color:#FF4000;">1 )</div>
<div class="resultInformation">
<p class="title"><a class="title" href="{{ $result['link'] }}" target="_blank">{{ $result['titel'] }}</a>
</p>
<div class="link">
<div>
<div class="link-link"><a data-count="1" data-host="test.de" data-hoster="fastbot" href="https://www.fastbot.de/red.php?red=3365000124457707395+http://www.test.de" target="_blank">{{ $result['anzeigeLink'] }}</a>
</div>
<div class="options"><a data-container="body" data-html="true" data-placement="auto bottom" data-title="&lt;span class='glyphicon glyphicon-cog'&gt;&lt;/span&gt; Optionen" data-toggle="popover" data-trigger="focus" tabindex="0"><span class="glyphicon glyphicon-triangle-bottom"></span></a>
<div class="content hidden">
<ul class="options-list list-unstyled">
<li><a href="https://metager.de/meta/meta.ger3?focus=web&amp;eingabe=test%20site%3Awww.test.de&amp;encoding=utf8&amp;lang=all">Suche auf dieser Domain neu starten</a>
</li>
<li>
<form method="get" action="/meta/meta.ger3" enctype="multipart/form-data" accept-charset="UTF-8" class="form">
<input type="hidden" name="focus" value="web" />
<input type="hidden" name="eingabe" value="test -host:test.de" />
<input type="hidden" name="encoding" value="utf8" />
<input type="hidden" name="lang" value="all" />
<input type="hidden" name="mobile" value="0" />
<input type="submit" name="" value="test.de ausblenden" />
</form>
</li>
</ul>
</div>
</div>
</div> <span class="hoster ">von <a href="http://www.fastbot.de">fastbot</a></span>
<a class="proxy" data-container="body" data-content="Der Link wird anonymisiert geöffnet. Ihre Daten werden nicht zum Zielserver übetragen. Möglicherweise funktionieren manche Webseiten nicht wie gewohnt." data-placement="auto right" data-toggle="popover" href="https://proxy.suma-ev.de/cgi-bin/nph-proxy.cgi/en/I0/https/www.fastbot.de/red.php?red=3365000124457707395+http://www.test.de" onmouseout="$(this).popover('hide');" onmouseover="$(this).popover('show');" target="_blank"><img alt="Proxy-Icon" src="/img/proxyicon.png" />anonym öffnen</a>
</div>
<div class="description">{{ $result['descr'] }}</div>
</div>
</div>
@endforeach
@endsection
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment