sith717 Posted August 10, 2008 Share Posted August 10, 2008 Is there a PHP script. That when someone tries to view the source of a website, it will not let them. Or allow them to, but it will say "You are not allowed to view the source of this website." Something like that. The reason is because I have a very expensive template design and do not want anyone ripping it. Or even looking at the source. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/ Share on other sites More sharing options...
sith717 Posted August 10, 2008 Author Share Posted August 10, 2008 Bump. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612959 Share on other sites More sharing options...
sith717 Posted August 10, 2008 Author Share Posted August 10, 2008 Anyone? This is urgent. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612961 Share on other sites More sharing options...
cooldude832 Posted August 10, 2008 Share Posted August 10, 2008 what do you mean "source" and how is it "urgent" viewing source code is what a browser does to render a page so it has to be read. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612962 Share on other sites More sharing options...
sith717 Posted August 10, 2008 Author Share Posted August 10, 2008 Is is possible that when a person tries to view it to steal a template is unable? Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612963 Share on other sites More sharing options...
wildteen88 Posted August 10, 2008 Share Posted August 10, 2008 No this is not possible with PHP. It can be done with javascript, however it is easily gotten around by disabled JavaScript. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612965 Share on other sites More sharing options...
sith717 Posted August 10, 2008 Author Share Posted August 10, 2008 Do you have the javascript handy? Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612967 Share on other sites More sharing options...
wildteen88 Posted August 10, 2008 Share Posted August 10, 2008 No search google for such a script. IMO you're wasting your time. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612968 Share on other sites More sharing options...
cooldude832 Posted August 10, 2008 Share Posted August 10, 2008 that is what a copyright is for. You can make no-cache pages if you wish to prevent a browser from caching a page for finical security but really source code has to be rendered. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612969 Share on other sites More sharing options...
genericnumber1 Posted August 10, 2008 Share Posted August 10, 2008 As cooldude pointed out, it's impossible with any technology to stop someone from looking at the source of your web page. You can stop people from right clicking (in internet explorer), but that doesn't stop viewsource:, disabled javascript, ctrl-u, or view -> page source... disabling right clicking really only serves to annoy people who aren't trying to view your source. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-612971 Share on other sites More sharing options...
ardyandkari Posted August 10, 2008 Share Posted August 10, 2008 http://www.iwebtool.com/html_encrypter if you really want to...kinda stupid if you ask me... Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613103 Share on other sites More sharing options...
corbin Posted August 10, 2008 Share Posted August 10, 2008 http://www.iwebtool.com/html_encrypter if you really want to...kinda stupid if you ask me... Would work if the user base wasn't very tech savvy. All it does is hex encode it though. sith717, to put it bluntly, to be able to render something on the client side, the client must know what it is rendering, yes? That would if I were like: "Ok, I'm going to ask you a math question. I can't tell you it though. What's the answer?" lol Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613118 Share on other sites More sharing options...
ardyandkari Posted August 11, 2008 Share Posted August 11, 2008 http://www.iwebtool.com/html_encrypter if you really want to...kinda stupid if you ask me... Would work if the user base wasn't very tech savvy. All it does is hex encode it though. sith717, to put it bluntly, to be able to render something on the client side, the client must know what it is rendering, yes? That would if I were like: "Ok, I'm going to ask you a math question. I can't tell you it though. What's the answer?" lol 42...duh! Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613212 Share on other sites More sharing options...
genericnumber1 Posted August 11, 2008 Share Posted August 11, 2008 42...duh! touche' Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613215 Share on other sites More sharing options...
beboo002 Posted August 11, 2008 Share Posted August 11, 2008 Put your page in php variable like $a="<html><body>Hi How r u.</body></html>"; echo the variable echo $a; its my suggestion. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613231 Share on other sites More sharing options...
Daniel0 Posted August 11, 2008 Share Posted August 11, 2008 beboo002, read the posts above, please. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613235 Share on other sites More sharing options...
ardyandkari Posted August 11, 2008 Share Posted August 11, 2008 Put your page in php variable like $a="<html><body>Hi How r u.</body></html>"; echo the variable echo $a; its my suggestion. you do realize that that will echo the html source so that the browser can read it and nothing will be hidden right? Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613421 Share on other sites More sharing options...
unsider Posted August 11, 2008 Share Posted August 11, 2008 Put your page in php variable like $a="<html><body>Hi How r u.</body></html>"; echo the variable echo $a; its my suggestion. Sorry, but... that's the funniest thing I've heard in quite a while. Thank you for a good laugh. Quote Link to comment https://forums.phpfreaks.com/topic/119036-viewing-source/#findComment-613422 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.