Jump to content

tiddy

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tiddy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I'm looking to create something like rinkworks dialectizer (http://www.rinkworks.com/dialect) and i need to replace all the <a href="[relative address]"> with <a href="[thispage]?page=[entire address]"> how can i do this without replacing all the <a href="[entire link]"> with <a href="[thispage]?page=[domain][entire address]">. For example I have: [i]<a href="somepage.html">[/i] which I want to replace with: [i]<a href="thispage.php?page=www.domain.com/somepage.html">[/i] and I want to replace: [i]<a href="www.domain.com/somepage.html">[/i] with: [i]<a href="thispage.php?page=www.domain.com/somepage.html">[/i] How do I do this without getting: [i]<a href="thispage.php?page=www.domain.comwww.domain.com/somepage.html">[/i] I am using str_replace('href="','href="thispage.php?page=' . $page,$pagestr); where $page is the address and $pagestr is the content of that page. Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.