From 1cfcc38f083798d789a206a4086a461c53553e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hauke=20Z=C3=BChl?= Date: Sat, 8 May 2021 08:55:58 +0200 Subject: [PATCH] Browserkennung --- php/muell.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/php/muell.php b/php/muell.php index 0c4c991..5740518 100755 --- a/php/muell.php +++ b/php/muell.php @@ -4,12 +4,12 @@ /** * Um die Werte für kommune und strasse zu erfahren, rufe https://www.egst.de/de/abfallabholung/ per * Browser auf und ermittle die gesendeten Daten in der Entwicklerkonsole deines Browsers. - * + * * Die Angaben hier im Skript stehen für Hörstel als Kommune und Im Wiesengrund als Strasse - * + * * Um die Daten an Telegram zu senden, musst du dir ein Skript/Programm schreiben, dass die API * von Telegram verwendet und Daten an dich oder deine Gruppe senden kann! - * + * * Beispiel für eine Konfigurationsdatei: * tgReceiver: * kommune: 2601 @@ -88,7 +88,7 @@ $data = [ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); -curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla 70'); +curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0'); $response = curl_exec($ch)."\n"; @@ -97,7 +97,7 @@ curl_close($ch); if ($response !== false) { // If result file does not exist, write it to have a copy file_put_contents($muellFile, $response); - + // Go on with checking the result data worker($response, $config); } else {