wwfc_barmy_army Posted November 8, 2006 Share Posted November 8, 2006 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. Quote Link to comment Share on other sites More sharing options...
php_joe Posted November 8, 2006 Share Posted November 8, 2006 At the very [b]top[/b] of your page put this:[code]<?phpif($site){header("Location: $site");}?>[/code]Then this code should send you to Google:http://www.mysite.com/link.php?site=http://www.google.comIf 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]<?phpif($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=2Joe Quote Link to comment Share on other sites More sharing options...
wwfc_barmy_army Posted November 8, 2006 Author Share Posted November 8, 2006 Thanks php_joe :) Quote Link to comment Share on other sites More sharing options...
php_joe Posted November 8, 2006 Share Posted November 8, 2006 no problem.It's my payback for all the help that I've received, and still do, from this forum.Joe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.