Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts

    replace specific links

    I'm trying to add [DL] 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[/DL]', $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:

    [DL]http://www.mediafire.com/?xxxxxx[/DL]
    [DL]http://www.mediafire.com/?123456[/DL]
    thanks a lot !

  • #2
    New Coder
    Join Date
    Jan 2008
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    bump...

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ........

  • #4
    New Coder
    Join Date
    Jan 2008
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    help sos mayday mayday

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    still need help..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •