Jump to content

Frame for my site's external links


Norman

Recommended Posts

You know, when somebody post a new link on my forum (for example), or when I post an external link into one oh my .php page, I would like to open a new window using a link like this:(in my site's pages) http://www.example.com/external-link.php?=...condexample.com(in that site) http://www.secondexample.com/ -> using a tab wich say [this site is not a part of *my site name*]Can you help me?

Link to comment
Share on other sites

  • 2 weeks later...

Convert all your future URLs? I suppose you need a DeLorean and a flux capacitor, with 1.21GW of power and then you can go into the future and run the script on whatever URLs you want.If you want to search for link tags in a string of text then you need to use a regular expression to find them all and get the URL from each tag. PHP has a function called parse_url that you can use to break up the URL into its parts, and you can add your extra stuff to the querystring, put the URL back together, and replace the link tag already on the page with str_replace. That's if you do it in PHP, with Javascript you would have to break up the URL yourself.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...