Mailinglisten-Archive |
Björn Schotte schrieb am Montag, den 6. September 1999:
> Nun moechte ich, dass ich vom ersten Zeichen
> von $content bis zum Ende des <body>-Tags alles
> weggeloescht wird.
<URL: http://infosoc.uni-koeln.de/pipermail/php/1999-September/004724.html >:
$file = 'dateiname.html';
/* Read file content */
$fd = fopen($file,'r');
$contents = fread($fd, filesize($file));
fclose($fd);
/* Discard unwanted parts */
$contents = eregi_replace('^.*<BODY[^>]*>', '', $contents);
$contents = eregi_replace('</BODY>.*$', '', $contents);
Das sollte funktionieren (wenn nicht, bitte Bescheid geben!).
Ciao,
Martin
--
Martin Ramsch <m.ramsch_(at)_computer.org> <URL: http://ramsch.home.pages.de/ >
PGP: 0xE8EF4F75, 52 44 5E F3 B0 B1 38 26 E4 EC 80 58 7B 31 3A D7
php::bar PHP Wiki - Listenarchive