Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Is there a way to hide source code in browsers?

Is there a way to hide source code in browsers?

Closed Thread
  #1 (permalink)  
Old 03-20-05, 10:33 PM
dunmore dunmore is offline
New Member
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Is there a way to hide source code in browsers?

I have developed a site using a combination of HTML and PHP pages. I would like to know if there is a simple way (or a script) that can prevent surfers from viewing my HTML source code? I will appreciate any suggestions.
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #2 (permalink)  
Old 03-20-05, 10:49 PM
Codename_Delta Codename_Delta is offline
Newbie Coder
 
Join Date: Mar 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
As far as I know, there is no way to do this easily without encrypting your code. There are javascripts that can prevent the user from right clicking, but there are ways around that, like in IE you can go to View -> Source, and then you get the source code. Encrypting is the only way I can think of.
__________________
Codename_Delta
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #3 (permalink)  
Old 03-21-05, 03:04 PM
Jambo Jambo is offline
Newbie Coder
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Well as far as i know you can't view PHP in most source viewers. And the only way is to encrypt (i think)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #4 (permalink)  
Old 03-21-05, 03:08 PM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
The php not will not shown in a browser, even if someone tried to download the page using some kind of download program.

But the HTML will be shown, and there are a few little javascript programs out there that will "encode" the HTML. Check www.dynamicdrive.com
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #5 (permalink)  
Old 03-22-05, 11:18 AM
kjmatthews kjmatthews is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: Boston, MA
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
It would be a good idea to evaluate why you want to hide your source code. The only safe and effective why to hide your HTML is to not put it on the internet.

PHP, on the other hand, is a server-side language that does not get transmitted to the browser ever, so it is safe from prying eyes. All people will see is the resultant HTML in the source.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #6 (permalink)  
Old 04-15-05, 04:09 AM
medniex medniex is offline
New Member
 
Join Date: Apr 2005
Location: Latvia
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Hex

Try encrypt your code in HEX using javascript functions. But this is not a very good solution because advanced users can decode it and page loads slower.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #7 (permalink)  
Old 04-15-05, 05:54 AM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
You can "encrypt" your code, but you can encode it... but any web guru that wanted your code can spend two minutes and get it.
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #8 (permalink)  
Old 05-15-05, 03:25 PM
puppetcaptain puppetcaptain is offline
New Member
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
puppetcaptain

Create one page that loads 2 frames, one at 0 percent and 1 at 100 percent. put the code you don't want to be viewed in the frame that is 0 percent and now when someone clicks on view source, all they see is the html for loading the frames. This works quite well until they try to resize the frames. Just make the page load with frame resize disabled. I don't have any of the code, but most everyone knows how to do it. It is even in the Microsoft knowledge base. Just search on how to use frames.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #9 (permalink)  
Old 05-16-05, 02:14 AM
snaip's Avatar
snaip snaip is offline
iNET Interactive
 
Join Date: Nov 2003
Posts: 965
Thanks: 1
Thanked 2 Times in 2 Posts
__________________
Regards,
Ahmad Permessur
Team HotScripts
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
  #10 (permalink)  
Old 05-16-05, 11:29 AM
kjmatthews kjmatthews is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: Boston, MA
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Create one page that loads 2 frames, one at 0 percent and 1 at 100 percent. put the code you don't want to be viewed in the frame that is 0 percent and now when someone clicks on view source, all they see is the html for loading the frames. This works quite well until they try to resize the frames. Just make the page load with frame resize disabled. I don't have any of the code, but most everyone knows how to do it. It is even in the Microsoft knowledge base. Just search on how to use frames.
Puppetcaptain, this won't work because the page that contains the HTML for loading the frames also contains the path to the frames. All the user has to do is follow those paths to find the desired source code.

Snaip's solution will work, though (as the site says) the process of decoding the Javascript is trivial. Users who have disabled Javascript will just see a blank page.

The only way to effectively keep people from getting your source is to not put it on the internet.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
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
HELP hide data from appearing in html source code generated by perl redd218 Perl 2 03-01-05 04:03 AM
Source Code Bravi JavaScript 6 02-09-05 06:03 AM
Source Code Repository MrDarko PHP 0 08-18-04 06:33 PM
Look for a source code bionicsamir Script Requests 3 01-29-04 06:21 PM


All times are GMT -5. The time now is 05:34 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.