RegExp ... Links-extracting and changin on the fly
| From: | Armin Steiner | Date: | Fri, 19 May 2000 17:25:09 +0000 |
| Subject: | RegExp ... Links-extracting and changin on the fly | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-208@lists.php.net to get a copy of this message | ||
Hello friends,
sorry for this one, but i did not find anything really meeting my
problem. I want to extract and change all links from a file "on
the fly" and then show the file. I thought to readin the file with
fopen() and then work with regexp. First searching for any
link exisiting in this file, keeping the original-link in mind (or
better to say in a variable), then changing the link. i.e.:
<a href="function.go.html">blafoo</a>
getting this one and changing it into
shared.php3?org_link=function.go.html.
If user klicks on the link, it should go this way:
--> shared.php3:
<?php
include('top.inc.php3');
include('$org_link');
include('bottom.inc.php3');
?>
and then it should start over again. The routine to do this is
placed in top.inc.php3 ...
my problem is the RegExp. Maybe you can help me out? Or maybe
you have a better idea?
[changing anything in the php.ini is not possible ...if you thought of
using auto_prepend]
with best regards,
-Armin
--
PHP Centralpoint - Dynamic Web Pages @t http://www.dynamic-webpages.de
Installation, BestOfGML, Tipps, Tutorials, WhoIsWho, German Manual ...