Nö, so komfortabel ist das nicht. Tippst Du denn immer die gleichen Zahlen? Und selbst das würde ja für Spiel 77 und Super6 nichts helfen.
Auf meiner Seite werden oben die Zahlen der letzten Ziehung und unten die Zahlen der vorletzten Ziehung angezeigt. Meine Familienmitglieder müssen dann Ihre Zahlen jeweils selbst vergleichen.
Umgesetzt habe ich es wie folgt:
Der Server lädt per wget die Seite mit den Lottozahlen:Anschließend lasse ich diverse sed-Befehle auf die Datei /tmp/lottodatei los und füge anschließend die "nackten" Lottozahlen in eine HTML-Seite ein. Danach sieht das dann so aus:Code:wget -q -O /tmp/lottodatei http://www.lotto.de/subnav/gewinnzahlen-quoten
Bildschirmfoto vom 2012-06-19 19:58:53.png
Einfach, aber es funktioniert!![]()
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
Hab es dann jetzt so gelöst
leider stehen die zahlen nun untereinander und nicht nebeneinander wie ich es gerne hätte.PHP-Code:// display lotto
$text = file_get_contents('/lottodatei');
$text = explode(',00 Euro <p>',$text);
$text = explode('</p>',$text[1]);
$text = str_replace(array(' ',' ',' '),'',$text[0]);
$opt = array(
'width' => 570,
'align' => ALIGN_LEFT
);
imagettftextboxopt($im, 34, 0, 100, 200, $style['textcolor'], $style['font'], $text, $opt);
// display lotto ende
Beispiel:
kann mir da evtl jamand helfen?
Geändert von web-ranger (20.06.2012 um 11:21 Uhr)
Sorry, hat ein wenig länger gedauert. Hier ist mein Code:
Das hier ist mein Versuch, die Lottozahlen von von der Webseite auszulesen und dann in meine eigene Html-Seite einzubinden. Falls jemand Verbesserungsvorschläge hat, mal immer her damit!Code:# Aktualisierung der Lottozahlen cp /tmp/lotto.txt /tmp/lotto_temp.txt cp /var/www/programme/lotto_neu.html /tmp/lotto.html sed -i -e '1,/<div id="gwzQuo649Left">/d' /tmp/lotto_temp.txt sed -i -e '14,/<div id="gwzQuoS77Left">/d' /tmp/lotto_temp.txt sed -i -e '16,/<div id="gwzQuoS6Left">/d' /tmp/lotto_temp.txt sed -i -e '18,/<*html>/d' /tmp/lotto_temp.txt sed -i -e '2d' /tmp/lotto_temp.txt sed -i -e '1s/<h3>Ziehung//' /tmp/lotto_temp.txt sed -i -e '13s/<h3>Ziehung/Spiel 77 - Ziehung von/' /tmp/lotto_temp.txt sed -i -e '15s/<h3>Ziehung/Super 6 - Ziehung von/' /tmp/lotto_temp.txt sed -i -e 's/<li>ZZ/Zusatzzahl/g;s/<li>SZ/Superzahl/g' /tmp/lotto_temp.txt sed -i -e 's/<p>/ /g' /tmp/lotto_temp.txt sed -i -e 's/ //g' /tmp/lotto_temp.txt sed -i -e 's/<.*>//g;' /tmp/lotto_temp.txt sed -i -e 's/^[ \t]*//;s/[ \t]*$//' /tmp/lotto_temp.txt sed -n '1p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '35r /tmp/cache.txt' /tmp/lotto.html sed -i -e '1d' /tmp/lotto_temp.txt sed -n '9p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '39r /tmp/cache.txt' /tmp/lotto.html sed -n '10p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '43r /tmp/cache.txt' /tmp/lotto.html sed -n '13p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '45r /tmp/cache.txt' /tmp/lotto.html sed -n '15p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '48r /tmp/cache.txt' /tmp/lotto.html sed -i -e '7,20d' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -n '1p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e 's/ULZahlen/ /g;38r /tmp/cache.txt' /tmp/lotto.html cp /tmp/lotto.txt /tmp/lotto_temp.txt sed -i -e '1,/<div id="gwzQuo649Right">/d' /tmp/lotto_temp.txt sed -i -e '14,/<div id="gwzQuoS77Right">/d' /tmp/lotto_temp.txt sed -i -e '16,/<div id="gwzQuoS6Right">/d' /tmp/lotto_temp.txt sed -i -e '18,/<*html>/d' /tmp/lotto_temp.txt sed -i -e '2d' /tmp/lotto_temp.txt sed -i -e '1s/<h3>Ziehung//' /tmp/lotto_temp.txt sed -i -e '13s/<h3>Ziehung/Spiel 77 - Ziehung von/' /tmp/lotto_temp.txt sed -i -e '15s/<h3>Ziehung/Super 6 - Ziehung von/' /tmp/lotto_temp.txt sed -i -e 's/<li>ZZ/Zusatzzahl/g;s/<li>SZ/Superzahl/g' /tmp/lotto_temp.txt sed -i -e 's/<p>/ /g' /tmp/lotto_temp.txt sed -i -e 's/ //g' /tmp/lotto_temp.txt sed -i -e 's/<.*>//g;' /tmp/lotto_temp.txt sed -i -e 's/^[ \t]*//;s/[ \t]*$//' /tmp/lotto_temp.txt sed -n '1p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '53r /tmp/cache.txt' /tmp/lotto.html sed -i -e '1d' /tmp/lotto_temp.txt sed -n '9p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '57r /tmp/cache.txt' /tmp/lotto.html sed -n '10p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '60r /tmp/cache.txt' /tmp/lotto.html sed -n '13p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '63r /tmp/cache.txt' /tmp/lotto.html sed -n '15p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e '66r /tmp/cache.txt' /tmp/lotto.html sed -i -e '7,20d' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt sed -n '1p' /tmp/lotto_temp.txt > /tmp/cache.txt sed -i -e 's/ULZahlen/ /g;55r /tmp/cache.txt' /tmp/lotto.html sed -i -e '24r /tmp/ReloadTime' /tmp/lotto.html mv /tmp/lotto.html /var/www/
Mit sed kann man auch Zeilenumbrüche entfernen. Wie das mit php geht, weiss ich leider nicht.
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
Da sieht das mit php aber einfacher aus, auch wenn ich da noch das Problem mit der Ausrichtung habe
Gruß
Yoda haste recht. Aber wenn ich ganz ehrlich bin, verstehe ich noch nicht mal ansatzweise, was Dein Script macht. Lädst Du mit Zeile zwei die Zahlen von lotto.de und schreibst sie nach /lottodatei? Und die Zeilen drei bis fünf machen dann, dass in /lottodatei anschließend nur noch die Lottozahlen stehen?
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
mit deinem
lade ich lotto seite per cron in meine "lottodatei"Code:wget -q -O /tmp/lottodatei http://www.lotto.de/subnav/gewinnzahlen-quoten
Wo soll das script suchen:
von:PHP-Code:$text = file_get_contents('/lottodatei');
bis:PHP-Code:$text = explode(',00 Euro <p>',$text);
rest dann ausgabePHP-Code:$text = explode('</p>',$text[1]);
das so ganz grob erklärt
gruß
Danke.
Bearbeite Deine Lottodatei nach dem PHP-Skript mal mit
Da ich Deine Lottodatei nicht genau kenne, musst Du evtuell die Zeile, aber der sed anfangen soll, ändern. Außerdem ist zu beachten, dass Du dieses Skript mehrfach ausführen kannst (musst), damit alle Lottozahlen in einer Reihe stehen.Code:sed 'N;s/\n/ : /'
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
sorry aber was genau fang ich damit an? von sed hab ich dafür null plan![]()
Als Ergebnis schreibt er Dir Deine Lottozahlen in eine Reihe.
Ganz exakt nimmt der Befehl jede zweite Zeile einer Textdatei und fügt sie an die vorhergehende an. Wenn Du beispielsweise ursprünglich zwanzig Zeilen Text hast, dann sind es nach dem ersten Durchlauf des o. a. Befehls noch zehn. Nach einem weiteren Durchlauf noch 5, dann drei, zwei und dann eine. Nach fünfmaliger Anwendung des Befehls stehen Deine Zahlen in einer Reihe in der Datei.
In meinem Skript ist das die Zeile.Code:sed -i -e 'N;s/\n/, /' /tmp/lotto_temp.txt
Geändert von Linksys-User (21.06.2012 um 09:56 Uhr) Grund: Text hinzugefügt.
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
lotto_temp.txt ist die datei in die er es schreibt oder die datei die er bearbeiten soll?
Das ist die Datei, die mit sed bearbeitet werden soll. Dein PHP-Skript, dass die Lottozahlen aus der Seite extrahiert lässt Du vorher laufen, so dass in dieser Datei nur noch die Lottozahlen untereinander stehen. Nach dem einmaligen Ausführen des sed-Befehls dürften danach nur noch halb so viele Zeilen in der Datei vorhanden sein.
Anbindung ans Internet:
Line 1: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082 Line 2: T-Com C&S VDSL50 IP (D:50MBit/s - U:10MBit/s) ↔ Speedport 221 ↔ Linksys RV082
VoIP-Provider:
1.: sipgate trunking 2 ~~~ 3.: sipgate basic ~~~ 4.: T-Com im Rahmen der C&S IP
VoIP-Hardware:
mehrere Linksys SPA-962 --> Linksys SRW208MP --> Auerswald Compact 3000 VOIP --> Linksys RV082 V2 Firmeware 2.0.2.01-tm
Kann mir mal jemand weiterhelfen in Bezug auf die Anzeige von Grafiken oder Werten ?
Ich habe eine Hausautomation (Homematic) am laufen.
Dort gibt es ein Archiv (CCU-Historian) welches ebenfalls auf dem QNAP läuft.
Dort kann ich dann unter Eingabe einer angepassten http- Adresse eine Grafik der letzten 24h anzeigen lassen.
Wie kann ich diese Grafik in meinen Infoframe einbinden ?
Noch besser wäre es natürlich nur die Werte (Innen-, Aussentemperatur sowie Luftfeuchte) anzeigen zu lassen.
Dafür müsste ich die Werte wohl irgendwie auslesen ? Auf der Seite http://localhost:83 werden die Werte angezeigt und könnten so dann ja auch eigentlich aus dem Seitenquelltext ausgelesen werden (zumindest finde ich die Werte dort die ich gerne anzeigen will). Ist das mit Infoframe möglich und wenn ja wie ?
Kann mir (als Noob) da jemand weiterhelfen ?
Geändert von ralalla (26.07.2012 um 12:03 Uhr)
FritzBox 7390 84.05.05freetz-devel-8191;Ersatzbox: FritzBox 7170; QNAP 219 P II, 1&1 Doppel-FLAT Regio 16000 ; Philips NP2900; 2x 1&1 Audio Center ; AVM MT-D;
Hi ralalla!
Leider schreibst du nicht, welches Format das Ergebnis deiner "angepassten HTTP-Adresse" hat. Falls es ein *.jpg-Bild ist, dann kannst du es mit einem Link einbinden.Zitat von ralalla
z.B.:
Code:$wcimagefile = 'http://192.168.10.32/loginfree.jpg'; $wc = @ImageCreateFromJpeg ($wcimagefile); /* Bild darstellen */ if ($wc) { imagecopyresampled($im, $wc, 45, 150, 0, 0, $image_width-120, $image_height-170, imagesx($wc), imagesy($wc)); }
Hi,
mein Phillips 8FF3WMI ist heute von ebay gekommen
Was muss ich denn an dem Bilderrahmen machen damit er die jpg von meinem Webserver holt.
Wenn ich ne rss erstellen muss wäre ich dankbar für ein Beispiel.
Danke
bicmac
Hi zusammen,
ich hätte eine Frage bzgl. der Wetteranzeige... Das ganze lief bisher seit über einem Jahr problemlos. Jetzt ist es so, dass immer wieder die Wetterdaten nicht angezeigt werden. Nach einer kurzen Zeit sind diese jedoch wieder da. Hat Google da irgendetwas geändert, dass diese nicht ständig abgefragt werden dürfen?!
VIelleicht hat jemand das gleiche bei sich schon beobachtet und hat eine Lösung für das Problem.
Vielen Dank dafür.
Master FRITZ!Box Fon WLAN 7390 FRITZ!OS 05.21-22366 ; Huawei UMTS Stick K3765
Slave FRITZ!Box Fon WLAN 7270 29.04.80
3 AVM MT-F
Alle Mobilteile sind über das DECT der MasterBox angeschlossen
ich habe das selbe Problem....
Jedoch noch keine Idee. Ich nehme mal an das da eine Beschränkung in der Anzahl der Zugriffe pro Stunde oder so geändert wurde.![]()
DAs habe ich mir fast gedacht. VIelleicht hat ja jemand eine Idee, wie man das umgehen könnte...
Master FRITZ!Box Fon WLAN 7390 FRITZ!OS 05.21-22366 ; Huawei UMTS Stick K3765
Slave FRITZ!Box Fon WLAN 7270 29.04.80
3 AVM MT-F
Alle Mobilteile sind über das DECT der MasterBox angeschlossen
@ Bolle: Ja ist bei mir auch so. Belibt abzuwarten ob es sich um ein kurzfristiges Problem handelt oder ob Google tatsächlich die Zugriffe beschränkt.
@ bicmac: Du benötigst eine RSS die Du auf deinem Server oder whatever ablegst. Dann musst Du die RSS in Philips Programm angeben damit der Frame diese öffnet. Darin muss sich der manipulierte Inhalt befinden. Hier mal ein Beispiel:
Du musst halt die "http://192.168.178.1:5050/info.jpg" an deine IP anpassen. Der Rest sollte Stimmen.Code:<?xml version='1.0' encoding='UTF-8'?> <rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'> <channel> <atom:id>http://picasaweb.google.com</atom:id> <lastBuildDate>Mon, 11 Jan 2010 13:17:57 +0000</lastBuildDate> <category domain='http://schemas.google.com/g/2005#kind'>http://schemas.google.com/photos/2007#album</category> <title>Unbenanntes Album</title> <description/> <managingEditor>Markus</managingEditor> <generator>Picasaweb</generator> <openSearch:totalResults>3</openSearch:totalResults> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>1000</openSearch:itemsPerPage> <gphoto:allowPrints>true</gphoto:allowPrints> <gphoto:allowDownloads>true</gphoto:allowDownloads> <item> <guid isPermaLink='false'>http://picasaweb.google.com</guid> <pubDate>Mon, 11 Jan 2010 13:17:29 +0000</pubDate> <atom:updated>2010-01-11T13:17:29.289Z</atom:updated> <category domain='http://schemas.google.com/g/2005#kind'>http://schemas.google.com/photos/2007#photo</category> <title>info.jpg</title> <description></description> <enclosure type='image/jpeg' url='http://192.168.178.1:5050/info.jpg' length='0'/> <link>http://picasaweb.google.com</link> <media:group> <media:content url='http://192.168.178.1:5050/info.jpg' height='600' width='800' type='image/jpeg' medium='image'/> <media:credit>Markus</media:credit> <media:description type='plain'/> <media:keywords/> <media:thumbnail url='http://192.168.178.1:5050/info.jpg' height='54' width='72'/> <media:thumbnail url='http://192.168.178.1:5050/info.jpg' height='108' width='144'/> <media:thumbnail url='http://192.168.178.1:5050/info.jpg' height='216' width='288'/> <media:title type='plain'>info.jpg</media:title> </media:group> </item> </channel> </rss>
Gruß Thomas
Router: AVM FRITZ!Box Fon WLAN 7390 | FW FRITZ!OS 05.50
Statusmonitor: Phillips 8FF3WMI | freetz devel 10175 | Callmonitor 1.20.9
DSL: 1&1 Doppel-FLAT 16000 (14755kBits/1141kBits) | LD 25dB/15dB | S/R 6dB/6dB
Vermittlungstelle: Broadcom 163.65 | DSL - Treiber 1.68.22.14 | HVt = 1027m
Hallo Bolle,
die URL http://www.google.de/ig/api?weather=$city liefert manchmal keine Daten zurück (Fehler bei Google?).
In so einem Fall probiere ich es einfach bis zu 5x neu mit jeweils 5 sec Wartezeit.
Mal sehen, ob das hilft...
Tschau
Uwe
FRITZ!Box Fon WLAN 7170 / FW 29.04.87