Hey Vinzenz
Danke erstmal für deine Antwort, ich hab mir mal die Befehlssyntax mit explode angeschaut und auch getestet.
Ich bekomme auch eine Ausgabe aber nur inet Adresse und nicht die IP. Schau mal
<?php
// Liest eine Datei in ein Array. Hier gehen wir über HTTP, um die
// HTML Datei einer URL zu bekommen
$lines = file ('messagesbackup/testfile');
// Durchgehen des Arrays und Anzeigen des HTML Source inkl. Zeilennummern
foreach ($lines as $line_num => $line) {
echo "{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n";
}
?>
Ausgabe :
0 : From MAILER-DAEMON Sat Dec 17 13:21:06 2005
1 : Date: 17 Dec 2005 13:21:06 +0100
2 : From: Mail System Internal Data <MAILER-DAEMON@.de>
3 : Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
4 : Message-ID: <1134822066@.de>
5 : X-IMAP: 1108825610 0000009008 $MDNSent
6 : Status: RO
7 :
8 : This text is part of the internal format of your mail folder, and is not
9 : a real message. It is created automatically by the mail system software.
10 : If deleted, important folder data will be lost, and it will be re-created
11 : with the data reset to initial values.
12 :
13 : From thomas@microfun.de Sat Dec 17 13:21:04 2005
14 : Return-Path: <thomas@.de>
15 : Received: from .de (.de [127.0.0.1])
16 : by microfun.de (8.13.5/8.13.5) with ESMTP id jBHCKmTD011837
17 : (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
18 : for <thomas@.de>; Sat, 17 Dec 2005 13:20:49 +0100
19 : Received: (from nobody@localhost)
20 : by microfun.de (8.13.5/8.13.5/Submit) id jBHCKmM4011836;
21 : Sat, 17 Dec 2005 13:20:48 +0100
22 : X-Authentication-Warning: .de: nobody set sender to thomas@.de using -f
23 : Received: from 192.168.20.6
24 : (SquirrelMail authenticated user thomas)
25 : by webmail.de with HTTP;
26 : Sat, 17 Dec 2005 13:20:48 +0100 (CET)
27 : Message-ID: 2494.192.168.20.6.1134822048.squirrel@webmail.de
28 : Date: Sat, 17 Dec 2005 13:20:48 +0100 (CET)
29 : Subject: online
30 : From: "Thomas" <thomas@.de>
31 : To: thomas@.de
32 : User-Agent: SquirrelMail/1.4.5-1
33 : MIME-Version: 1.0
34 : Content-Type: text/plain;charset=iso-8859-1
35 : Content-Transfer-Encoding: 8bit
36 : X-Priority: 3 (Normal)
37 : Importance: Normal
38 : X-www.de-MailScanner-Information: Please contact the ISP for more information
39 : X-www.de-MailScanner: Found to be clean
40 : X-www.de-MailScanner-From: thomas@.de
41 : Status: O
42 : X-Status:
43 : X-Keywords:
44 : X-UID: 9008
45 : eth0 Protokoll:Ethernet Hardware Adresse 00:C1:26:0E:CE:FD
46 : inet Adresse:192.168.19.2 Bcast:192.168.19.255
47 : Maske:255.255.255.0
48 : inet6 Adresse: fe80::2c1:26ff:fe0e:cefd/64
49 : Gültigkeitsbereich:Verbindung
50 : UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
51 : RX packets:5146287 errors:0 dropped:0 overruns:0 frame:0
52 : TX packets:6460734 errors:0 dropped:0 overruns:10 carrier:0
53 : Kollisionen:0 Sendewarteschlangenlänge:1000
54 : RX bytes:3374497054 (3.1 GiB) TX bytes:1031786973 (983.9 MiB)
55 : Interrupt:11 Basisadresse:0xc000
56 :
57 :
58 : --
59 : Diese Nachricht wurde auf Viren und andere gefaehrliche Inhalte untersucht
60 : und ist - aktuelle Virenscanner vorausgesetzt - sauber.
61 : MailScanner dankt transtec Computer fuer die freundliche Unterstuetzung.
und wie bekomme ich nun die Inet Adresse und das Datum ausgefiltert ?
Datum denke ich mal wäre zu realisieren mit strtotime.
Gruss Thomas