OK here is what I am doing:
I am writing a page that fetches another page for caching purposes...
what I want to do is this:
replace any <img src="/relative.link"> with <img src="http://mysite.com/image.php?site=http://theirdomain.com/relative.link
I also want to do this with href and action
There will possibly be html attributes before the tag start and the attribute.
There may also be a difference in quotes such as " ' or none at all
I also want them to go to their corresponding pages like /htmlpage.php and /formpage.php
if possible I would like regular expressions
the domain will be stored in $domain without a trailing '/'
Thank you if you can help!