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. Link to comment https://forums.phpfreaks.com/topic/26596-solvedhiding-links/ 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 Link to comment https://forums.phpfreaks.com/topic/26596-solvedhiding-links/#findComment-121649 Share on other sites More sharing options...
wwfc_barmy_army Posted November 8, 2006 Author Share Posted November 8, 2006 Thanks php_joe :) Link to comment https://forums.phpfreaks.com/topic/26596-solvedhiding-links/#findComment-121653 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 Link to comment https://forums.phpfreaks.com/topic/26596-solvedhiding-links/#findComment-121660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.