View Full Version : protect html code
sid6.7 01-14-2004, 05:25 PM hi,
i have a website where i want to protect
the HTML code and paths to different files, images
that are written there...
if someone right clicks on a webpage
they can "view source".....
how do i prevent that? i have seen it somewhere
before...
i dont want a password protected page..its a public page
anyone can view..i just dont want the right click thing...
Rosey 01-14-2004, 05:46 PM You can disable right click but you can never completly stop someone from viewing your source. They can simply go to the browser and view the source from there. If they really want to, they can rummage through their temp files and find it there. They can also just save your page and get the info that way.
You can't prevent someone from seeing your code.
bellportal 01-14-2004, 06:11 PM If you want the piece of javascript which allows you to stop the 'Right-Hand Click', then you can find it at:
http://www.javascriptsource.com
SsjDave3 01-15-2004, 01:22 AM Well the disabling right click on the page is very useful if you have frames since if they go to edit on the toolbar they will only get the code for your frames :) overall I tried everything to get a person from not getting my html source and it doesn't work.Also if you see this anywhere it says prevent a person from seeing your sources.<INVISIBLE></INVISIBLE> it doesn't work either,I tried...
burntsushi 01-15-2004, 03:05 AM nope can't stop anyone from viewing your code...
Especially images, I just have to open up my cache, and all images that have been downloaded are there :)
bellportal 01-15-2004, 08:20 AM I think that the frames is the right way to go. If they view the source, though, and get the URL of the main page (for example) then they could just go to Notepad and open the URL. ;)
As the French might say - C'est impossible!
Chris 01-16-2004, 08:44 AM even if you don't have a frames site, you can make it one:
<html>
<head>
<title>TITLE</title>
</head>
<frameset rows="100%,*" border="0" frameborder="0" framespacing="0" framecolor="#000000">
<frame name="main" src="MAIN URL GOES HERE"><frame>
<noframes>Your browser does not support frames. You need to upgrade your browser to view this page.</noframes></frameset>
</html>
this will make it slightly harder for the people to copy your stuff, but it won't stop them. other ways to make it harder are:
1. Disable the right click
2. Add a whole load of line spaces to the beginning of the html code (this may lead the person to believing you have no code
3. Make your page full screen so that there is no toolbar (and add no right click)
bellportal 01-16-2004, 04:07 PM 3. Make your page full screen so that there is no toolbar (and add no right click)
Users can still look in their cache! ;)
MaGiCSuN 01-16-2004, 04:47 PM with that you only 'tell' visitors to steal it even more, and annoy them even more and slow the page down even more... so eventually, your page wouldn't get any better from it
there's no way to protect it, end of story :)
if you don't want to take the risk, then don't put it online.
showing something is just taking a risk to it...
Love,
Mirna
Chris 01-16-2004, 05:21 PM and i suppose if they want to steal your stuff, then its a compliment, right? ;)
bellportal 01-16-2004, 07:22 PM and i suppose if they want to steal your stuff, then its a compliment, right? ;)
Yeah - but its also a pain in the ^^^^ when you see something which resembles your site on another domain, and the owner won't admit its your code! :)
ok so it's not nice when you see someone has ripped off your site (i've had something close to a rip lately, but the guy was pretty nice about it and removed the almost identical pages) but it can't be avoided - although it can sometimes be deterred.
there are companies that "guarantee" that they can protect source code, there are also websites that laugh at these companies and prove them wrong.
HTML has been around for years, so your chances of doing something original there are about zero. why try protecting it? out of the possible things you might have on your site, the HTML is the least worth hassling over :)
burntsushi 01-17-2004, 08:03 PM indeed, if skilled, anyone can look at a site, and re-write the code for it...
someone great once said:
"Good designers copy, great designers steal" - Picasso
Philosophy behind it: http://www.sitepoint.com/article/1150
and Thox is right... The stuff you want to protect, is the software you create for your site... That is where originality comes in :)
weird girl 01-17-2004, 10:41 PM HTML has been around for years, so your chances of doing something original there are about zero. why try protecting it? out of the possible things you might have on your site, the HTML is the least worth hassling over :)
True. It stinks though that there's no surefire way to keep people from taking your images, :( although you can at least prevent people from direct linking your images. And you can always ban the IP address of the meanie who stole your stuff.
bane_vagabond 01-18-2004, 12:13 AM I think it's impossible to NOT see a websites source.... Everything I think of has a "counter-attacK". I tried one of those encrypters, but someone could easily just decrypt it. And that frames thing doesn't work, as bellportal said. They could just type the url that the source of the frames page(<frame name="main" src="MAIN URL GOES HERE"><frame>) gives you into the address bar, then view that source.
You could try encrypting your code, I don't know how to do it properly wth symbols and no real words but you could try http://www.dynamicdrive.com/dynamicindex9/encrypter.htm it kind of encrypts it- it changes the order making it harder to follow your code
Soyokaze 05-08-2004, 11:26 PM Well, i think we should still do as much as we can to protect our stuff. The way I see it, if they want to waste their own time engery and hassling then I guess they want it bad enough to deserve it.
It basically just to weed out the ones who don't work hard to improve their own sites.
I mean, come on, that's probably how WE mostly learned our HTML stuff right?
PHP Guru 05-09-2004, 03:59 AM You could try encrypting your code, I don't know how to do it properly wth symbols and no real words but you could try http://www.dynamicdrive.com/dynamicindex9/encrypter.htm it kind of encrypts it- it changes the order making it harder to follow your codeActually, what it does is converts symbols (like [ and ], and < and >), and quotes, single quotes, and tilders to a url encoded form. [ becomes %5B, ] becomes %5D, and so on. For example, if you have a form, that has a method of GET, and a user entered "[weird]", in the URL it would show up as "%5Bweird%5D"...
You could actually use a PHP function called urldecode to easily decrypt it.
I just thought you might like a little background on the process :)
Sheila 05-09-2004, 09:00 AM This is from January....closing it.
|