Help - Search - Members - Calendar
Full Version: A Little Webpage Creation Help
Linuxhelp > In The Community > General Discussion
Robert83
Hi,


Questions :

I.

How can I password protect a site ? and where do I need to store that password, how do you
do this in a nice way ?


II.

If I use php how can I display time date and stuff like that ? How do you check the type / version of the clients browser and system ?


Sincerely
Robert B
Corey
For password protecting a site, check out Joey's htaccess guide:

http://www.linuxhelp.ca/guides/htaccess/


To display date and time in php, check out the following link:

http://www.wdvl.com/Authoring/Languages/PHP/Date_Time/

To acquire a visitor's browser and OS, use php's get_browser function described in the php manual here:

http://ca.php.net/manual/en/function.get-browser.php

The php manual is a really good resource because not only are all things php explained by the developers, but there are also comments from users with code examples, etc.
Robert83
Hi,

thanx smile.gif

it works it's cool, and here another question,

is there a way to disable the viewing source of the webpage somehow ? (I already managed to disable right clicks)

how can one hide page names , example (I can't explain this any other way)
http://192.168.2.250/univer/univer.php
only show
http://192.168.2.250
so I wouldn't show /univer/univer.php or any other things only http://192.168.2.250

how can one change that default HREF onmove icon , I mean that hand ...anoying hand, I'm using a cool Starcraft cursor on my page, and I'm also using flash, is there a way to tell IE somehow to use that starcraft cursor even when I hold my mouse over a button or when I hold my mouse over a flash thing

and do you know a good cgi counter with good install instructions, since I just installed one but it wouldn't show up at all...


Sincerely
Robert B
Corey
You can accomplish that by using frames. Just create one frame, and the url should never change.

Another option is to sign up with cjb.net which will do that for you.
dlab
There is no real way to prevent people from viewing the source of your page. There are methods like obfuscating the HTML using Javascript, but this restricts the number of browsers that can view it. Also, if someone tries hard enough, you can unobfuscate it in a matter of seconds using its own decoder. eg:

Source of an obfuscated page:
CODE
<html>
<head>
<script language="Javascript" type="text/javascript">
var html;
html = "%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3ETest%20Page%3C/title%3E%0A%3C/head%3E%0A%3Cbody
%3E%0A%3Ccenter%3EThis%20HTML%20is%20obufiscated%21%3C/center%3E%0A%3C/body%3E%0A%3C/html%3E";
document.write(unescape(html));
</script>
</head>
<body>
</body>
</html>


Simple change to give you the HTML:

CODE
<html>
<head>
</head>
<body>
<a id="source" name="source"></a>
<script language="javascript" type="text/javascript" defer>
var html;
html = "%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3ETest%20Page%3C/title%3E%0A%3C/head%3E%0A%3Cbody
%3E%0A%3Ccenter%3EThis%20HTML%20is%20obufiscated%21%3C/center%3E%0A%3C/body%3E%0A%3C/html%3E";
document.all.source.innerText = unescape(html);
</script>
</body>
</html>


If you do this, you will get something like :

CODE
<html> <head> <title>Test Page</title> </head> <body> <center>This HTML is obufiscated!</center> </body> </html>  


If you do get desparate enough, there is a PHP obfuscater that encodes pages that are dynamic so you don't have to stick with static html called IonCube (http://www.ioncube.com/html_encoder.php). Its a PHP mod where you include the PHP encoder and it obfuscates all of the HTML outputted by it.

Think I have said "obfscate" enough?
hughesjr
One thing that I would like to point out is that dynamic pages (like .php, .asp, .cfm, etc.) display the rendered page, not the programming code. (although scripts embedded in the html are displayed).

so you don't see the:

CODE
<?php
 echo "<b>whatever</b>";
?>


you only see:

CODE
<b>whatever</b>


in the page code.
--------------------
also ... if you make it hard for spiders to crawl your pages, the page won't make it into google and other search engines.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.