Hi Leute!
Ich möchte per PHP eine Datei (wens interessiert: SA:MP Ban-Definitions-Datei) parsen und in eine Datenbank einlesen.
Die Datei besteht aus Zeilen in diesem Format:
Quelltext
1:
| IP [01/09/07 | 01:17:39] PLAYERNAME - INFOTEXT |
Diese möchte ich ein eine DB mit den Feldern IP, UPDATE, NAME zerlegen. Den Infotext brauch ich nicht.
Die Datei wird per HTTP-Upload an ein PHP-Script übertragen.
Meine Frage jetzt: was brauche ich dafür für Funktionen? Mit Dateiverarbeitung unter PHP hab ich nie was gemacht, also hab ich da so gar keine Ahnung... Irgendwie muss ich die Datei zeilenweise kriegen... danach die paar RegEx drüberschicken ist nicht so das Problem.
Danke schonmal,
Martok
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."