| | | | |
| | |
| Gast
Beiträge: n/a
| Hallo, ich möchte den Tonerstand oder die Seitenanzahl aus der Webseite vom Drucker auslesen und in eine neue Seite schreiben. (evtl. Speicherung in MySQL) Ist das irgendwie möglich? Hier mal der Quell: Code: <html>
<meta http-equiv="Refresh" content="30">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<STYLE TYPE="text/css"><!--
BODY { font-family:arial,helvetica; margin-left:0; margin-top:0; margin-right:0; font-size:10pt; }
A { color:#0033CC; text-decoration:none }
A:hover, A:active { color:#0033CC; text-decoration:underline }
td { font-family:arial,helvetica; }
input { font-size:smaller }
select { font-size:smaller }
#smaller { font-size:smaller } #small1 { font-size:smaller } #small2 { font-size:x-smaller }
#small1b { font-weight:bold; font-size:smaller; } #small2b { font-weight:bold; font-size:x-smaller; }
#small1t { font-weight:bold; font-size:9pt; color:#0033CC; } #small2t { font-weight:bold; font-size:8pt; color:#0033CC; }
#larger { font-size:larger } #large1 { font-size:larger } #large2 { font-size:x-larger }
--></STYLE>
<title></title>
</head>
<body bgcolor="#FFFFFF" link="#0033CC" alink="#0033CC" vlink="#0033CC">
<table><tr><td>
<table border=0 cellpadding=0 cellspacing=0><tr><td>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td valign=top rowspan=2 bgcolor=#cdcdcd>[img]../images/lefton.gif[/img]</td>
<td valign=top bgcolor=#ffffff>[img]../images/topoff.gif[/img]</td>
<td valign=top rowspan=2 bgcolor=#cdcdcd>[img]../images/righton.gif[/img]</td>
<td valign=bottom rowspan=2 bgcolor=#ffffff>[img]../images/botoff.gif[/img]</td>
</tr>
<tr>
<td align=center bgcolor=#ffffff width=200 id="small2t">Printer Status</td>
</tr>
</table>
</td></tr></table>
<table border=0 cellpadding=2 cellspacing=0><tr><td>
<table border=0 cellpadding=2 cellspacing=0><tr>
<td nowrap id="small1">Printer Status</td>
<td nowrap id="small1">|Printer Events</td>
<td nowrap id="small1">|Print Volume</td>
<td nowrap id="small1">|Printer Information</td>
</tr></table>
</td></tr></table>
<hr>
<nobr><font size=+2>Printer Status - </font>[img]../images/refresh.gif[/img]Refresh</nobr>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td nowrap width=250></td><td></td></tr>
<tr><td nowrap>Cyan Toner (C) Level ~ 60 %</td><td nowrap></td></tr>
<tr><td nowrap><table frame=border border=2 cellpadding=0 cellspacing=0 bordercolor="cyan"><tr><td nowrap width=120 height=15 bgcolor="cyan"></td><td nowrap width=80 height=15 bgcolor="White"></td></tr></table>
</td><td></td></tr>
<tr><td nowrap>Magenta Toner (M) Level ~ 100 %</td><td nowrap></td></tr>
<tr><td nowrap><table frame=border border=2 cellpadding=0 cellspacing=0 bordercolor="magenta"><tr><td nowrap width=202 height=15 bgcolor="magenta" colspan=2></td></tr></table>
</td><td></td></tr>
<tr><td nowrap>Yellow Toner (Y) Level ~ 80 %</td><td nowrap></td></tr>
<tr><td nowrap><table frame=border border=2 cellpadding=0 cellspacing=0 bordercolor="yellow"><tr><td nowrap width=160 height=15 bgcolor="yellow"></td><td nowrap width=40 height=15 bgcolor="White"></td></tr></table>
</td><td></td></tr>
<tr><td nowrap>Black Toner (K) Level ~ 60 %</td><td nowrap></td></tr>
<tr><td nowrap><table frame=border border=2 cellpadding=0 cellspacing=0 bordercolor="black"><tr><td nowrap width=120 height=15 bgcolor="black"></td><td nowrap width=80 height=15 bgcolor="White"></td></tr></table>
</td><td></td></tr>
</table></td></tr></table>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td nowrap width=40%>Consumables:</td><td nowrap width=15%>Status:</td><td width=45%></td></tr>
<tr><td nowrap width=40%>Drum Cartridge</td><td nowrap width=15% bgcolor="Lightgreen">OK</td><td width=45%></td></tr>
</table></td></tr></table>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td nowrap width=40%>Paper Trays:</td><td nowrap width=15%>Status:</td><td nowrap width=15%>Capacity:</td><td nowrap width=30%>Size:</td></tr>
<tr><td nowrap width=40%>MPF</td><td nowrap width=15%>OK</td><td nowrap width=15%>150 sheets</td><td nowrap width=30%>--</td></tr>
<tr><td nowrap width=40%>Tray 1</td><td nowrap width=15% bgcolor="Lightgreen">OK</td><td nowrap width=15%>250 sheets</td><td nowrap width=30%>A4 (210 x 297 mm)</td></tr>
</table></td></tr></table>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td nowrap width=40%>Output Tray:</td><td nowrap width=15%>Status:</td><td nowrap width=15%>Capacity:</td><td nowrap width=30%></td></tr>
<tr><td nowrap width=40%>Center Output Tray</td><td nowrap width=15% bgcolor="Lightgreen">OK</td><td nowrap width=15%>250 sheets</td><td nowrap width=30%></td></tr>
</table></td></tr></table>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td nowrap width=40%>Cover:</td><td nowrap width=15%>Status:</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
<tr><td nowrap width=40%>Front Door</td><td nowrap width=15% bgcolor="Lightgreen">Closed</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
<tr><td nowrap width=40%>Reg Cover</td><td nowrap width=15% bgcolor="Lightgreen">Closed</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
<tr><td nowrap width=40%>BTR Cover</td><td nowrap width=15% bgcolor="Lightgreen">Closed</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
<tr><td nowrap width=40%>Paper Cover</td><td nowrap width=15% bgcolor="Lightgreen">Closed</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
<tr><td nowrap width=40%>Feeder 1 Cover</td><td nowrap width=15% bgcolor="Lightgreen">Closed</td><td nowrap width=15%></td><td nowrap width=30% ></td></tr>
</table></td></tr></table>
<table border=1 cellpadding=4 cellspacing=0 width=100%><tr><td nowrap>
<table border=0 cellpadding=2 cellspacing=0 width=100%><tr>
<tr><td width="40%" nowrap id="small1b">Printer Type</td><td width="60%">Color Laser</td></tr>
<tr><td width="40%" nowrap id="small1b">Printing Speed</td><td width="60%">5 Pages/Minute (Color), 25 Pages/Minute (Monochrome)</td></tr>
</table>
</td></tr></table>
</td></tr></table>
</body>
</html>
|
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| ¯\_(ツ)_/¯ Registriert seit: 18.06.2008
Beiträge: 8.814
PHP-Kenntnisse: Fortgeschritten ![]() ![]() ![]() ![]() ![]() ![]() ![]() | So wie ich das jetzt verstanden habe kannst du über den Browser auf deinen Drucker zugreifen und dann wird dir per HTML Ausgabe der Tonerstand angezeigt. Du kannst die Seite einlesen und dann die relevanten Teile herrausfiltern. Dazu kannst du dich mal mit folgenden Befehlen auseinandersetzen. Damit könntest du schon einiges anfangen.
__________________ ▇█▓▒░◕‿‿◕░▒▓█▇ |
| |
| | |
| Gast
Beiträge: n/a
| Oh, ich muss gestehen, die Frage falsch verstanden zu haben. Dank UrlWrapper kannst Du die Seite per http mit den "normalen" Dateifunktionen einlesen. Bspw $content = file_get_contents('http://192.168.1.123/status'); Und wenn der Code da oben schon die gesamte Seite ist, würde ich mir keine Gedanken darüber machen, den Datenstrom Stück für Stück einzulesen. http://de2.php.net/file_get_contents |
| | ||
| Gast
Beiträge: n/a
| Zitat:
| |
| | |
| Gast
Beiträge: n/a
| Das würde ich aus Bequemlichkeit über PCRE lösen. PHP-Code: |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Regex: Auslesen der Meta-Tags einer Webseite Sucheingrenzung | pepe24 | PHP Tipps 2008 | 12 | 31.05.2008 15:41 |
| Ordner auslesen und während des auslesen sortieren | Dooki | PHP Tipps 2008 | 6 | 14.05.2008 17:50 |
| Komplette Webseite bleibt "stehen" | crazyhead | PHP-Fortgeschrittene | 4 | 01.09.2007 17:58 |
| Vom Browser verschickte Daten auslesen und anzeigen? | andy32 | PHP Tipps 2008 | 3 | 22.08.2007 18:33 |
| Webseite komplett auslesen | PHP Tipps 2006 | 5 | 20.07.2006 12:49 | |
| Webseite auslesen | Katrin | PHP Tipps 2006 | 6 | 21.04.2006 20:43 |
| gelöst: Tabelle auslesen -&amp;amp;gt; Gleiche Einträge nur 1 Mal | Datenbanken | 3 | 31.03.2006 01:44 | |
| Daten eintragen und auslesen | Rettungsdackel | Datenbanken | 0 | 14.09.2005 16:29 |
| eMail Adressen einer Webseite auslesen ? | madSoul | PHP Tipps 2005-2 | 10 | 08.09.2005 12:17 |
| [Erledigt] nächste Zeile einer Db auslesen? | PHP Tipps 2005-2 | 7 | 01.08.2005 00:11 | |
| alle Verzeichnisse sortiert auslesen | PHP Tipps 2005-2 | 7 | 17.07.2005 10:20 | |
| Mehrsprachige Webseite | PHP Tipps 2005-2 | 4 | 08.07.2005 08:19 | |
| auslesen und nochmals auslesen?! | $$$ ThiKool $$$ | PHP Tipps 2005 | 23 | 10.03.2005 19:43 |
| [Erledigt] html aus einer webseite auslesen | PHP-Fortgeschrittene | 7 | 14.02.2005 11:03 | |
| Klassen auslesen | PHP Tipps 2007 | 8 | 10.01.2005 07:07 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| tonerstand anzeigen, tonerstand auslesen, dell tonerstand, drucker tonerstand auslesen, status drucker toner, toner auslesen, php drucker auslesen, dell drucker tonerstand, druckergerät, \tonerstand anzeigen\, drucker tonerstand, tonerstand auslesen php, drucker tonerstand abfragen, tonerfüllstand auslesen, tonerstand script, tonerstand scripts, tonerstand auslesen script, dell 3100 toner stand auslesen, dell drucker auslesen, 9420cn tonerstand |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.