Re: [PHP] Reading a file and changing a href tag values

2001-04-14 Thread Plutarck

All you need is a regular expression, provided by ereg function or preg
functions.

You'd have the regex look for a href then capture everything up to /a

Then just adjust the result as you want it to appear.


You'll need to either search around for code that already does this, or be
willing to learn regular expressions (which you should do anyway).

Otherwise it will seem impossible.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Brett"" [EMAIL PROTECTED] wrote in message
012701c0c4a2$cbc7f840$LocalHost@Default">news:012701c0c4a2$cbc7f840$LocalHost@Default...
 I have been able to find out how to read a file and replace certain
matches,
 but I want to be able to take a web page stored in a string and change the
 a href tags and add www.mysite.com?page=   before the actual link value
so
 the new url would read www.mysite.com?page=original_url.  Can I do this
and
 if so will someone give me an idea how?   Thanks.

 Brett


 --
 PHP General 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 General 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] Reading a file and changing a href tag values

2001-04-13 Thread Brett

I have been able to find out how to read a file and replace certain matches,
but I want to be able to take a web page stored in a string and change the
a href tags and add www.mysite.com?page=   before the actual link value so
the new url would read www.mysite.com?page=original_url.  Can I do this and
if so will someone give me an idea how?   Thanks.

Brett


-- 
PHP General 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]