Hello,
I have lots of LINKS and FORMS refering to some other site. I want to be able to do this:
for example: old link: <A href="http://www.affiliate.com/games/index.jsp?locale=en_us_US&pageName=gameFaq¤cyCode=USD&cid=159874" title="24 hr Customer Care">24 hr Customer Care</a>
TO >>
<A href="http://www.mysite.com/games/index.php?sitename=none/index.jsp?locale=en_us_US&pageName=gameFaq¤cyCode=USD&cid=159874" title="24 hr Customer Care">24 hr Customer Care</a>
OR
http://dg.affiliate.com/index.jsp?action=viewRegion®ionId=3&cid=159874
TO http://www.mysite.com/games/index.php?sitename=dg./index.jsp?action=viewRegion®ionId=3&cid=159874
And also, how do i - replace everything from <head> to </head> with my text.
Thanks.
What have you tried so far?
$html4 = preg_replace("'<a href=\"/index.jsp;jsid=[>]*?\?'si","<a href=\"http://www.mysite.com/folder/index.php?sitename=none/index.jsp?",$html3);
That works.. but i haven't figured out how to solve this.
How do i hold onto the subdomain name. Once i have the subdomain name, then i need to do exactly what is done above and when i do a replacement, i need to add sitename=subdomainname
http://dg.affiliate.com/index.jsp?a...&cid=159874
TO http://www.mysite.com/games/index.p...&cid=159874