Hi Mangiola,
yes you can.
If the html-document is local on your server, you can "fopen"
it an then parse line for line like this:
<?php
if ( $fp = @fopen( "path/to/my/file/plus-the.file", "r" ) )
{
while( ! feof( $fp ) )
{
$line = fgets( $fp, 4096 );
if ( ! strpos( $line, "<P>" ) === false )
{
echo $line;
break;
}
}
fclose( $fp );
}
?>
... And if it's on a remote Host, then do the same but with "fsockopen"
(find help in the php-manual/Network Functions).
Hope t'll help.
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
_______________________________________________________________
Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________
-----Original Message-----
From: Mangiola Nunzio Datavia [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 2:01 PM
To: PHP Windows List (E-mail)
Subject: [PHP-WIN] Strip text from HTML
Hi
I'd like to strip the first paragraph
of a html document and display it.
basically the introduction and no more.
Is this possible?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]