Jump to content

[Solved]'Hiding' Links


wwfc_barmy_army

Recommended Posts

Hello.

I am writing a site, but due to the content links i feel that people might just go to view source and copy it. I've seen it before but i can't remember where, but i want to 'mask' the URL, so instead of the actual link you have something like http://www.mysite.com/link.php?=5, or even just http://www.mysite.com/link.php?=http://www.google.com.

I just want to make it a bit more difficult to people to copy the content.

Anyone got any tutorials or links anywhere?

Cheers.
Link to comment
Share on other sites

At the very [b]top[/b] of your page put this:
[code]<?php
if($site){
header("Location: $site");
}
?>[/code]

Then this code should send you to Google:
http://www.mysite.com/link.php?site=http://www.google.com

If you don't want the address to be visible in the link then you can store it on the page (or external file) and call it by a number:

[code]<?php
if($site){
$key = $site;
$address = array("http://www.yahoo.com", "http://www.google.com", "http://www.excite.com");
header("Location: $address[$key]");
}
?>[/code]

And use the number in this link:
http://www.mysite.com/link.php?site=2

Joe
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.