English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Any simple techniques to hide source on a html page or make it harder for someone to read, im just creating a little web challenge site... Ive done one where the html source is way at the bottom of the page but im thinking of more complex ides now, any help?

2007-08-17 03:03:37 · 5 answers · asked by stfreddy77 2 in Computers & Internet Programming & Design

5 answers

Unfortunately, you cannot "hide" HTML: this is the text code sent by your server to the "client" 's machine, and "show source" will always show the lot.
Javascript won't hide either: it runs also on the client's machine.
The way around it is to use a SERVER side script (PhP).
- Write your quiz in HTML as a form.
(This form code will be readable by the user) i.e.:


... your quiz here ...



- When the user is ready to send it, he clicks on a "send" button that calls A PhP SCRIPT. This is done with the term "action=answers.php".
Clicking the "Check Your Answers" button will "post" the form to the script "answers.php" on your server.
There, you check the answers, calculate the scores etc...
then return the results.
The user will never see the answers (they REMAIN on the server).
You can check a similar quiz on:
http://www.skytargets.com/wd/samples/recruitor/index.php
(it is in french, it is a quiz, but you can work it out! Check the sources, they are in English)

2007-08-17 22:18:48 · answer #1 · answered by just "JR" 7 · 0 0

I thought about this problem for a while. I concluded, but never tried, that using FRAMES could cause problems for persons wishing to spy on your work. You can also password protect pages from prying eyes.

I can't really see you having anything to hide though, as it will all have been done elsewhere. Unless it's the content, but surely that will be shown on the screen. I think I'm as curious as you to get a good answer to this question.

2007-08-17 03:55:36 · answer #2 · answered by Anonymous · 0 0

If you create some Javascript you could hide the code behind your ftp server and just call the code from your main Index page. I believe there is plenty of documentation on this for the average coder. It does require some changes and modifications to your code so depends on how much you want to do this.

2007-08-17 03:20:10 · answer #3 · answered by Anonymous · 0 0

As you've already discovered - lots of white space makes it awkward, though not impossible to read. Use spaces as well to put code way over to the right.

There are software programs that will convert your ASCII code to all numbers, but of course there are programs that will do the reverse too.

Unless you need real security because of the nature of what you are hiding, then I wouldn't bother too much. The average browsing person won't care and anyone who wants your info will find a way to get it.

2007-08-17 03:13:42 · answer #4 · answered by Steven 4 · 0 0

Go to the page. Click View/Source. That's the source.

2016-05-20 21:22:35 · answer #5 · answered by ? 3 · 0 0

fedest.com, questions and answers