Hi Could someone kindly explain this to me or point me to a resource on the net to find an example! The php manual (http://www.php.net/preg_replace) is not clear to me - if anything, it has confused me really.
I have this script that retireves a page and I want to parse all the href + src tags, as per the following conditions:- 1) if the tag starts with "http//" or "https//" then add the script's location first. For example: src="http:// ... complete url .. " is replaced with: src="MYDOMAIN/script.php?http:// ... complete url .. " 2)if the tag does *NOT* start with "http//" or "https//" then add the script's location AND "http://host/folder" of the retrieved page first. For example: If the URL of retrieved page is something like: "http://www.retrieved.com/pages/page.htm" Then: src="/page.htm" is replaced with: src="MYDOMAIN/script.php?http://www.retrieved.com/pages/" followed by: "/page.htm" Any help would be appreciated. Regards, David ___________________________________________________________ Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
