General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 17th, 2003, 12:40 AM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 122 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 29 m 24 sec
Reputation Power: 15
Protect the contents of my webpage

Hi guys,

I am wondering how can i lock the contents of my webpage like what this webpage did ?

http://www.seoinc.com/

In this site, i can't even right click and view their HTML source.. How did they do that ? It is like all the contents are protected.

Can I use php code to do the same thing or I only can do it by using javascript ? or i need to purchase something in order to do that ?

Please advise.

Reply With Quote
  #2  
Old November 17th, 2003, 06:51 AM
Selleri Selleri is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Iceland
Posts: 46 Selleri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 sec
Reputation Power: 16
You can view the source and right click on that url you gave. Are you sure you weren't over a flash part of the web when you right clicked?

Reply With Quote
  #3  
Old November 19th, 2003, 02:07 PM
mattp23 mattp23 is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: UK
Posts: 82 mattp23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 44 sec
Reputation Power: 15
i think the code you are looking for is the following javascript:
<!--
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button
== 2 || event.button == 3)) {
alert("This website and all it's contents are Owned and licensed by Search Engine Optimization Inc.\n All contents are Copyrighted and not available for download or use on any other site.\n\n *ALL RIGHTS RESERVED* 1994-2003.\n Search Engine Optimization, Inc. SEO Inc.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
-->

Reply With Quote
  #4  
Old November 19th, 2003, 02:10 PM
mattp23 mattp23 is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: UK
Posts: 82 mattp23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 44 sec
Reputation Power: 15
as you may have guessed the above code only works with IE, They may have plasered their copywrite all over this code but there are many free codes to disable the right mouse button, none of them will acually protect your code from any experianced web user but they will all annoy visitors to your site.

Reply With Quote
  #5  
Old November 19th, 2003, 02:19 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
Yes, you definitely shouldn't consider hiding source code to be a security measure, and you shouldn't put anything sensitive or proprietary in your source. One has only to save a page as a text document and open it in an editor to view the source if you disable the right mouseclick.

Reply With Quote
  #6  
Old November 20th, 2003, 06:02 AM
Selleri Selleri is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Iceland
Posts: 46 Selleri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 sec
Reputation Power: 16
Ah, sweet Mozilla Firebird, protects me from such anoying things

One way to bypass this is to keep your right button pressed while you click okay, then release it, you might have to click okay once more but you should have gotten the right menu by now.

What I realy hate are pages that disable view source, like this one here ,
doesn't bother me though since I switched to Firebird

Reply With Quote
  #7  
Old November 20th, 2003, 09:32 AM
mattp23 mattp23 is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: UK
Posts: 82 mattp23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 44 sec
Reputation Power: 15
or just click view > source

Reply With Quote
  #8  
Old February 10th, 2004, 05:13 PM
Techline Techline is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 Techline User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking You can still view the page

You can still view the page... simply click on View->Source from the Internet Explorer pull-down menu. The site has re-programmed your right mouse button, that's all.



Quote:
Originally Posted by Alicia
Hi guys,

I am wondering how can i lock the contents of my webpage like what this webpage did ?

URL

In this site, i can't even right click and view their HTML source.. How did they do that ? It is like all the contents are protected.

Can I use php code to do the same thing or I only can do it by using javascript ? or i need to purchase something in order to do that ?

Please advise.

Reply With Quote
  #9  
Old February 10th, 2004, 08:09 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
Its impossible to hide your source... as DHouston's mentioned, you can always save the file... you can always View > Source... you can always disable javascript...

one way I read was to somehow encode your code in a cryptic format by simply removing all the line breaks... thus making it hard to navigate through the source...

this again can be countered by just saving the document and formatting it yourself...

No source is safe... and it shouldn't be a problem...
who cares if someone sees your <tags>

Reply With Quote
  #10  
Old February 12th, 2004, 04:28 AM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 15
Send a message via MSN to Spongy
Quote:
Originally Posted by Selleri
What I realy hate are pages that disable view source, like this one here ,

I don't know what your problem is with this site... I can right-click, click on source and voila!!
But I agree, hiding your source is pointless, if you don't want anyone to see your source, don't create any and keep off the web. Most people hiding their source have something to hide, maybe their source isn't really theirs?

Reply With Quote
  #11  
Old November 4th, 2011, 02:13 PM
MastAvalons MastAvalons is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 10 MastAvalons User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 6 m 16 sec
Reputation Power: 0
You can use f-in-box

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Protect the contents of my webpage


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap