no source
Moderator: General Moderators
- cheatboy00
- Forum Contributor
- Posts: 151
- Joined: Sat Jun 29, 2002 10:36 am
- Location: canada
- Contact:
no source
I want to knwo how to make a person not beable to view source... I know theres a way to do it with java script and opening a new window... but i dont want to do it that way i just want people to go to my site and not beable to view teh source
if you have ideas please help
if you have ideas please help
- protokol
- Forum Contributor
- Posts: 353
- Joined: Fri Jun 21, 2002 7:00 pm
- Location: Cleveland, OH
- Contact:
I've seen people to crazy things with JavaScript and the ASCII table to encode characters and do all sorts of mathematical functions to screw with the source. So when you view source, you see a javascript function with a bunch of crazy characters where somewhere inside lies the sequence which defines only the characters which are used on your web page.
But honestly, don't go to such lengths. Just move beyond the fact that people will be able to see your source code on your HTML page. Rest assured however that your .php file will be private and not viewable to curious parties who want to steal your code.
But honestly, don't go to such lengths. Just move beyond the fact that people will be able to see your source code on your HTML page. Rest assured however that your .php file will be private and not viewable to curious parties who want to steal your code.
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
Although there's no way to prevent people from viewing the source 100% of the time--after all, they could go to their "temporary internet files"--there are a couple of preventative measures:
- 1. Place your page in a frameset, but use only one frame window (the page itself). That way they can't go to "View source" from the View menu to see the source code.
2. Suppress the "right-click" event, so they can't right-click and go to "View source."Code: Select all
<frameset rows="*" framespacing="0" border="0"> <frame src="mypage.php" marginheight="0" border="0" framespacing="0"> </frameset>
Code: Select all
function mouse_handler(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Sorry, that isn't allowed."); return false; } } if (document.captureEvents) // Netscape requires this { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown = mouse_handler;
I havea few already created Java scripts (By me! mwa hahah Java is my hand!!! Thats why I need PHP help.. I just can't grasp it) if you want them, email me: halo_dreams@hotmail.com - I can give them to you.. they will aid in your hidden source conquest.
However there all right, no matter what if someone wants to see, they will see. There are many ways of getting around it.
However there all right, no matter what if someone wants to see, they will see. There are many ways of getting around it.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
fatalcure wrote:have you guys noticed that in this forum, when you click on "POST REPLY", posting.php, you CANNOT view the source??
Im using MSIE 6.x on WinXP, and right click -> view source doesnt work
neither does view -> source on the file menu
just an observation
Nor can i.. hows it done?
Someone contact Jason he should know.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Could be that something in the javascript throws the rendering engine off, so it won't print the source. Like I said, there's nothing that I saw in the code that causes that behavior intentionally, but I've been more wrong before.
Plus, let's face it, it's fun to say that Microsoft has bugs; it never gets old
Plus, let's face it, it's fun to say that Microsoft has bugs; it never gets old
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
It must have something to do with the frame thingie containing the topic review - I can happily view the source when I go to the edit post bit that doesn't have that review.
If it's not a bug, why would the makers of open-source software try to prevent people looking at the source code of a page? It doesn't make sense, but that's just me (and I've never cared about people being able to 'steal' my source code, by the time they see it it's just a bunch of HTML).
Mac
If it's not a bug, why would the makers of open-source software try to prevent people looking at the source code of a page? It doesn't make sense, but that's just me (and I've never cared about people being able to 'steal' my source code, by the time they see it it's just a bunch of HTML).
Mac