Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 





Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 02-04-2005, 09:44 AM   #1 (permalink)
Member
 
Join Date: Sep 2004
Location: West Sussex UK
Posts: 21
OS: XP Pro / 2000


Is there a way to make my code secure?

Hi

I'm not sure if this is possible. Is there a way to prevent users seeing your website source code? I have implemented a "no-right click" function as follows:
function rightclick(){
if(event.button==2){warning()
alert("All images on this website are owned by ------")
;}
}document.onmousedown=rightclick// --]

function warning(){
}

This prevents users right clicking and selecting "View Source". However code can still be viewed quite easily by going to "View" in the top menu and then selecting "Source". Is there a way to prevent this? Alternatively is there a way to password protect my web pages/files (which are mostly in HTML and some PHP), as can be done with Excel spreadsheets?

Thank you for any help.

Matt
matt_h76 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 02-04-2005, 10:16 AM   #2 (permalink)
Fox
TSF Enthusiast
 
Fox's Avatar
 
Join Date: Sep 2002
Location: NJ
Posts: 7,752
OS: XP Pro, CentOS

My System

Send a message via ICQ to Fox Send a message via AIM to Fox Send a message via MSN to Fox Send a message via Yahoo to Fox Send a message via Skype™ to Fox
The PHP itself is usually safe from view source unless you forgot to install PHP on your server and just type in the file name from a browser (which is what I did before I learned that PHP requres a serverside interpreter)

I hate to say this, but there's a way around everything. Image protection? The most determined will just use the printscreen key and paste it into paint. If it's too big, they'll take the shots separately and piece them together.

As a rule, if the computer can see it, the user can see it.

As for password protection... I'm not exactly sure what you are referring to- on the internet or on your local machine? I don't think there's a way to password protect the file itself unless you put it in an archive (.zip, .rar, or one of the other ones) or inside a password protected directory (which can only be done on a NT, W2k, or XP machine under NTFS.
Fox is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 02-05-2005, 09:51 AM   #3 (permalink)
Analyst, Security Team
 
greyknight17's Avatar
 
Join Date: Jul 2004
Location: New York
Posts: 14,327
OS: Windows 98 & Windows XP Home/Pro

My System

I use a program that will encode your source file and even password protect it. This is a great piece of software but like Fox said, nothing is perfect/secure (especially once it goes online).

Do a Google search for HTML Cipher. I hope you like it as much as I do. Very easy to use.
__________________
Please do NOT PM me. Post whatever questions you may have in the forum and we will take a look at it when we get to it. If you have waited for more than 3 days, you may then and ONLY then PM me for assistance. I will take a look at it.

greyknight17 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 02-05-2005, 02:27 PM   #4 (permalink)
Registered User
 
Join Date: Jan 2005
Posts: 17
OS: xp


there isn't really any way you can 100% secure html.

With asp and php it's server side so all you coding is done on the server and just displays the results.

Why do you need to hide your code anyway, is there any real need for it?

Theres about 6 ways i can think of to try and hide your script with javascripts but theres always someone that can get around it.

www.hotscripts.com

go to that site and look around it'll have some scripts
jackel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 04:29 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82