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
https://forums.phpfreaks.com/topic/26596-solvedhiding-links/
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
https://forums.phpfreaks.com/topic/26596-solvedhiding-links/#findComment-121649
Share on other sites

Archived

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

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