Re: parsing parsed pages?
| From: | Charles Killian | Date: | Thu, 10 Aug 2000 23:34:05 +0000 |
| Subject: | Re: parsing parsed pages? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11244@lists.php.net to get a copy of this message | ||
Do what the BBC is doing:
1. write a special php page that as a variable takes the name of a page to
parse.
parser.php?page=www.pavethebay.org/info.php
2. then from parser use file() and join:
// get a web page into a string
$fcontents = join( '', file( http://$page") );
3. use preg_replace() to modify the string in $fcontents.
Such as prepending parser.php? to all of the links in the string.
That's it in a nutshell.
Charles
----- Original Message -----
From: "Andrew Challen" <Andrew@Challen.karoo.co.uk>
To: <php-general@lists.php.net>
Sent: Thursday, August 10, 2000 4:14 PM
Subject: [PHP] parsing parsed pages?
> I have been wondering for a while how I could parse a parsed page...
> I tried doing this in ASP and decided it would not be possible. (although
i
> could be wrong, still somewhat of a newbie when it comes to serer side
> script)
> Why you may ask well the reason is i wish to filter a parsed page so that
it
> could then be presented as a text only page and therefore would be useful
> for partial sighted people etc.... example at www.bbc.co.uk where they
have
> a text only option which parses pages and presents a text only... if this
> can be done with php i'd be very happy, if not how could i do it? all i
> really want to do is load the contents of a html file into a string then i
> could do the rest however this becomes slightly more complicated when the
> pages are server parsed...
>
> anyone?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>