Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Hiding code


Hiding code

Closed Thread
  #1 (permalink)  
Old 08-24-04, 09:50 AM
El Barto El Barto is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Hiding code

'Ello,

I was wondering if there was away to hide all of your code from the view > source screen?
  #2 (permalink)  
Old 08-24-04, 12:22 PM
nivek's Avatar
nivek nivek is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
I know someway....

Well you can disable right click, and for doing that you can go to Javascript.internet.com.

Heres a link that would link you to the no right click page:

http://javascript.internet.com/page-...ght-click.html

Note, people can right click if the disable javascript or if they use a mac

If you have the time please visit my site at http://linkfarm.tk
it has free game downloads, patches and and other cool downloads. Also we hold one of the biggest links section for every catigory! please add yours!

`linkfarm.tk
  #3 (permalink)  
Old 08-24-04, 12:24 PM
nivek's Avatar
nivek nivek is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Oops sorry that wouldent work :(

Oh i just forgot that people can go under view source under the view tab.
  #4 (permalink)  
Old 08-24-04, 12:46 PM
El Barto El Barto is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
ok, thank you
  #5 (permalink)  
Old 08-30-04, 11:35 PM
jamslam jamslam is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Don't even bother.

It is impossible to stop people from viewing source.

In your browser, on any web page, go to 'File > Save Web Page As...'... You then have all their images and their source

There is however... One way of hiding your source. Don't put it on the internet

Whatever you do, don't disable right click. As it disable user functionality such as adding your site to their bookmarks, refresh page, opening links in new window, printing, going back or forward in their browser's history, etc.

The minute you visit a web site, your browser downloads the site onto your computer so you may view it- that's before you can do anything.
  #6 (permalink)  
Old 09-04-04, 11:37 PM
Eclipse's Avatar
Eclipse Eclipse is offline
Coding Addict
 
Join Date: May 2004
Location: Long Island, New York
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
Your all wrong you can encrypt html codes so even after going to View ~ View Source it's still encrypted www.designerwiz.com/generator/encryptHTML1.htm there ya go
  #7 (permalink)  
Old 09-05-04, 10:17 PM
kvnband kvnband is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 242
Thanks: 0
Thanked 0 Times in 0 Posts
That's not really encryption. That's just turning like "<" into %3C and ">" into %3E

Very easy to "decrypt"

Honestly, there is no true way to keep a person from viewing your source
  #8 (permalink)  
Old 09-05-04, 11:00 PM
nekeno12 nekeno12 is offline
Wannabe Coder
 
Join Date: May 2004
Location: CO
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
You're going to have to give up on hiding source. Obviously in languages like PHP or ASP, you can hide script source, but HTML, no way. The browser has to see the source, otherwise it couldn't display the page. And there will never be a browser that doesn't display that source. Even if there was, it's not hard to receive HTTP requests using any web language and get the source there.
  #9 (permalink)  
Old 09-06-04, 07:56 AM
Eclipse's Avatar
Eclipse Eclipse is offline
Coding Addict
 
Join Date: May 2004
Location: Long Island, New York
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
try that encrption from a basic htrml document then open in ie it was display but the source will be encrypted
  #10 (permalink)  
Old 09-06-04, 10:19 AM
infinitylimit's Avatar
infinitylimit infinitylimit is offline
Code Guru
 
Join Date: Jun 2004
Location: Oregon
Posts: 758
Thanks: 0
Thanked 0 Times in 0 Posts
Eclipse, the link you gave says encryption but it's a misnomer. Your really just obfuscating the code.

El Barto,

Basically if you want to "protect" your code your looking at doing an 80/20 split 80 percent won't bother to figure out what you've done to make it harder. But there will always be 20 percent that will. If that is satisfactory to you, try this:


*abandon html tags for custom xml tags (you will lose alot of the people there)
*then use css on your xml tags to display them properly (not standard I know)
*go ahead and use the obfuscator that Eclipse linked but be sure and make it a linked in script using <script src="blah.js"></script>
*then why not use the disable right click, wouldn't hurt you already gone down the path why do things half way?

I personally wouldn't do it but I know it would stop a majority of people from viewing.
__________________
Hawk Enterprises -- Home to PHP games, open-source code, tutorials and free downloads
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP code to edit a text file mdhall Script Requests 12 12-23-10 04:03 AM
Source Code Repository MrDarko PHP 0 08-18-04 05:33 PM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 11:19 AM
How to sale php code to customer without giving him code pradeep_soft PHP 4 03-12-04 12:10 PM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM


All times are GMT -5. The time now is 10:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.