 |
Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc Comunitatea PHP Romania
|
| Subiectul anterior :: Subiectul următor |
| Autor |
Mesaj |
Georges
Data înscrierii: 17/Iun/2003
Mesaje: 13
|
| Trimis: Joi Iul 03, 2003 2:18 am Titlul subiectului: Disable [b]View Source[/b] |
|
|
| Cum se dezactiveaza optiunea " source " din meniul "View" al browse-ului ? :?: |
|
| Sus |
|
iepurec
Data înscrierii: 30/Iun/2003
Mesaje: 102
Locație: Timisoara
|
| Trimis: Joi Iul 03, 2003 8:48 am Titlul subiectului: Answer |
|
|
The short answer to how to do this is you can't. The slightly longer answer is that you can't if your pages use HTML.
When someone views your page, their browser needs to be able to read your source code in order to be able to determine what your page contains and how to display it. The browser first copies the source from the internet to the user's Temporary Internet Files folder on their computer prior to rendering the page in their browser window. In many cases the source code for your page is still stored on their computer even after they have disconnected from the internet. Anyone with a text editor on their computer (and that's everyone with a computer) can then access your source code by editing these files that are stored on their own computer. If you stop them from being able to download your pages like this then you also stop them from being able to read your page at all so you may as well not upload it in the first place.
With HTML pages on the web, the only thing that you can do is to make things harder for novices who might want to learn from your code, anyone who wants to steal your code knows ways around all of the obstacles and will still be able to steal your page.
The most common thing that people do to discourage novices from viewing their source code is to use a Javascript to disable the menu that displays when you right click on the page. You can find scripts to do this on just about any Javascript site and there are lots available on Javascripts.com. Unfortunately, the view source option on this menu is just a shortcut to the source and does not stop the user from selecting the same option from the view menu in the browser menu bar. Also there is nothing to stop visitors to your site from turning off the Javascript support in their browser so as to bypass any scripts you might have used.
Another trick is to place a large comment (of fifty lines or so) in the top of your source that advises that your source is protected and cannot be viewed. Novices may not realize that they only have to page down to find the source code.
You can find more information about the various ways that can be used to access and view the source code of html pages regardless of what "protection" the page author has implemented on the page "Viewing Someone Else's Source". Often being able to view the source of other people's pages is a good thing because it enables us to see how other people have been able to achieve the various effects implemented in their page and thus improve our knowledge of html, javascript, etc.
Unfortunately, the way the web works, all of the images on our page are also easily accessible along with the source code so there is no way to protect these from being stolen either. The best that we can do is to embed a copyright notice into the image itself which will hopefully discourage visitors from stealing them. For information about one way to place copyright notices into your images using Photoshop see "Adding a Copyright Notice". |
|
| Sus |
|
iepurec
Data înscrierii: 30/Iun/2003
Mesaje: 102
Locație: Timisoara
|
| Trimis: Joi Iul 03, 2003 8:52 am Titlul subiectului: Doc |
|
|
| Un alt articol am gasit la http://www.encrypt-html.com/_disable_view_source.htm |
|
| Sus |
|
Georges
Data înscrierii: 17/Iun/2003
Mesaje: 13
|
| Trimis: Dum Iul 06, 2003 11:27 pm Titlul subiectului: Multzam |
|
|
Merci mult.
poate imi spui care e secretul ca sa gaseshti ce te intereseaza mai ushor shi mai repede..... |
|
| Sus |
|
Georges
Data înscrierii: 17/Iun/2003
Mesaje: 13
|
| Trimis: Dum Iul 06, 2003 11:40 pm Titlul subiectului: Multzam |
|
|
Merci mult.
poate imi spui care e secretul ca sa gaseshti ce te intereseaza mai ushor shi mai repede..... |
|
| Sus |
|
PHPRomania Bot
Bot Member
Data înscrierii: 27/Dec/2007
Mesaje: 1
Locaţie: Server Google |
| Trimis: Mie Dec 26, 2007 7:01 pm Titlul subiectului: Ad |
|
|
|
|
|
| Sus |
|
| |
|