Commit 95f6bf47 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch 'development' into 'master'

Development

See merge request !1450
parents a9ca6735 928e4492
......@@ -360,7 +360,7 @@ class MetaGer
if (!$result->new) {
continue;
}
$link = $result->anzeigeLink;
$link = $result->link;
if (strpos($link, "http") !== 0) {
$link = "http://" . $link;
}
......@@ -373,9 +373,9 @@ class MetaGer
$hash = md5("meta" . $publicKey . $tldList . "GER");
# Query
$query = urlencode($this->q);
$query = $this->q;
$link = "https://api.smartredirect.de/api_v2/CheckForAffiliateUniversalsearchMetager.php?p=" . $publicKey . "&k=" . $hash . "&tld=" . $tldList . "&q=" . $query;
$link = "https://api.smartredirect.de/api_v2/CheckForAffiliateUniversalsearchMetager.php?p=" . urlencode($publicKey) . "&k=" . urlencode($hash) . "&tld=" . urlencode($tldList) . "&q=" . urlencode($query);
$answer = json_decode(file_get_contents($link));
# Nun müssen wir nur noch die Links für die Advertiser ändern:
......@@ -388,20 +388,17 @@ class MetaGer
# Hier ist ein Advertiser:
# Das Logo hinzufügen:
if ($result->image !== "") {
$result->logo = "https://img.smartredirect.de/logos_v2/60x30/" . $hash . ".gif";
$result->logo = "https://img.smartredirect.de/logos_v2/60x30/" . urlencode($hash) . ".gif";
} else {
$result->image = "https://img.smartredirect.de/logos_v2/120x60/" . $hash . ".gif";
$result->image = "https://img.smartredirect.de/logos_v2/120x60/" . urlencode($hash) . ".gif";
}
# Den Link hinzufügen:
$publicKey = $publicKey;
$targetUrl = $result->anzeigeLink;
if (strpos($targetUrl, "http") !== 0) {
$targetUrl = "http://" . $targetUrl;
}
$targetUrl = $result->link;
$gateHash = md5($targetUrl . $privateKey);
$newLink = "https://api.smartredirect.de/api_v2/ClickGate.php?p=" . $publicKey . "&k=" . $gateHash . "&url=" . urlencode($targetUrl) . "&q=" . $query;
$newLink = "https://api.smartredirect.de/api_v2/ClickGate.php?p=" . urlencode($publicKey) . "&k=" . urlencode($gateHash) . "&url=" . urlencode($targetUrl) . "&q=" . urlencode($query);
$result->link = $newLink;
$result->partnershop = true;
}
......
......@@ -366,19 +366,7 @@ class Result
$proxyUrl = base64_encode(str_rot13($link));
$proxyUrl = urlencode(str_replace("/", "<<SLASH>>", $proxyUrl));
return "https://proxy.suma-ev.de/" . $pw . "/" . $proxyUrl;
/*
$tmp = $link;
$tmp = preg_replace("/\r?\n$/s", "", $tmp);
$tmp = str_replace("=", "=3d", $tmp);
$tmp = str_replace("?", "=3f", $tmp);
$tmp = str_replace("%", "=25", $tmp);
$tmp = str_replace("&", "=26", $tmp);
$tmp = str_replace(";", "=3b", $tmp);
$tmp = preg_replace("#^([\w+.-]+)://#s", "$1/", $tmp);
$tmp = str_replace("//", "/=2f", $tmp);
return "https://proxy.suma-ev.de/mger/nph-proxy.cgi/en/w0/" . $tmp;
*/
return "https://proxy.metager.de/" . $pw . "/" . $proxyUrl;
}
/* Liest aus einer URL alle Informationen aus
......
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