...

View Full Version : replace specific links



ungovernable
06-23-2010, 07:59 AM
I'm trying to add tags between specific links to websites like mediafire and megaupload

currently i use this code:

$patern ='#(<a\s[^>]*href\="([^"]*(mediafire|rapidshare|megaupload|4shared|divshare|badongo|sendspace|sharebee|sendfile|filesend|kewl share|zshare|filestube)[^"]*)"[^>]*>).*?</a>#i';
$postmsg2 = preg_replace($patern, '[DL]$2', $postmsg);

but it will only replace links embbed with <a href="">...</a>

i would want to also replace links that doesn't have the <a href> tags

so basically i'm looking for a code that would transform


http://www.mediafire.com/?xxxxxx
<a href="http://www.mediafire.com/?123456">http://www.mediafire.com/?123456</a>

to:


http://www.mediafire.com/?xxxxxx
http://www.mediafire.com/?123456

thanks a lot !

ungovernable
06-25-2010, 03:58 AM
bump...

ungovernable
06-26-2010, 05:32 AM
........

ungovernable
06-28-2010, 05:37 AM
help sos mayday mayday

ungovernable
07-01-2010, 01:39 AM
still need help..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum