|
-
Feb 14th, 2007, 05:37 PM
#1
Thread Starter
WiggleWiggle
External Link Change
Im not sure if PHP can do this... but...
I want to check to see if there are external links on my pages and if there are, i want it to point to a framed page of mine with a url like this:
http://www.rapidfriends.com/external...w.vbforums.com
I just want to know how i can have it automaticly change the url from:
http://www.vbforums.com
to
http://www.rapidfriends.com/external...w.vbforums.com
My usual boring signature: Something
-
Feb 14th, 2007, 07:42 PM
#2
Re: External Link Change
you basically build a regular expression to handle URLs and use a function to replace regular URLs that are found with your redirection URL built-in to it (you can use preg_replace). if you do not allow html and have your own type of code (like bbcode: for example, [url=http://blah.com] or whatever), then you can easily add your external redirection page while parsing the URL stuff. otherwise, you'll have to just find a good regular expression that will work for it.
-
Feb 14th, 2007, 09:30 PM
#3
Re: External Link Change
Um ... there are legal issues with that. You cannot present pages not under your control within your own frameset - it violates copyright (or something), and there's precedent at least here in Austria.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 14th, 2007, 10:12 PM
#4
Re: External Link Change
Google does this, as do countless other websites. I don't see how you're going to get sued by someone over this.. Austria must be pretty weird.
-
Feb 15th, 2007, 08:43 AM
#5
Re: External Link Change
Not at all. Pretty much the same laws are in effect in Germany - there just hasn't been a lawsuit over it yet.
I can't recall the exact details. I think for this to apply the outer site must suggest (visually only suffices) that the inner site is part of the outer - for example, by providing a header or a border.
Google makes it very clear that the site shown is not, in fact, part of Google.
Legal issues aside, why would the OP want to do this anyway? Frames are bad, and making all external links go into a frameset is annoying.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 15th, 2007, 11:16 AM
#6
Re: External Link Change
of course it's annoying, but I suppose it's a way that some sites can put up their advertisements for people visiting sites outside of their own -- at least, that's the only way I've seen it used apart from Google's use. I assume that any site just tracking outgoing users would log the location, remote address and other information and then redirect them. I don't think you should be using frames for this unless you have something to show your user, really.. and even then, like CornedBee said, frames are bad and this would be rather annoying.
-
Feb 15th, 2007, 11:51 AM
#7
Re: External Link Change
The advertisements around foreign sites might well be problematic.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 15th, 2007, 06:26 PM
#8
Thread Starter
WiggleWiggle
Re: External Link Change
ok. i guess i will avoid doing this then, thanks for the suggestions though.
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|