Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Website things


Flaming_figures's Avatar
Member
0 0

Alright. I have a few questions about website creation (tips). 1. How do you make a directory an actual page (like hbh has /realistic/ and its a page like a normal one)? Another question is about PHP files. How do you view the source of them (Im not sure of ways, but say you know there is a file login.php perhaps?) Thank you. If you have any questions you want someone to answer about stuff like this, post your questions here.(oops, sorry, one more question :( ) Alright, I have made a login script taht is working now, but my question is, how do I restrict access to a file until you have entered correct info into the php form? (like, it redirects you to whatever if you filled it out correctly) but if you don't fill it out correctly you can't access the page. Sorry for all the questions.


ghost's Avatar
0 0

Flaming_figures wrote: Alright. I have a few questions about website creation (tips). 1. How do you make a directory an actual page (like hbh has /realistic/ and its a page like a normal one)? Another question is about PHP files. How do you view the source of them (Im not sure of ways, but say you know there is a file login.php perhaps?) Thank you. If you have any questions you want someone to answer about stuff like this, post your questions here.(oops, sorry, one more question :( ) Alright, I have made a login script taht is working now, but my question is, how do I restrict access to a file until you have entered correct info into the php form? (like, it redirects you to whatever if you filled it out correctly) but if you don't fill it out correctly you can't access the page. Sorry for all the questions.

  1. Call the file index.html, index.htm, index.php or whatever file extension you are using, but just call it index. There are other ways to accomplish this but this is the easiest way.
  2. You can't view the actual PHP source, because by the time it gets to you, its plain HTML. PHP is a server side language meaning the page is created by the server and then shown in your browser as a Client side language such as HTML and Javascript. There is actually an exploit that you can view the source of a PHP script, and I do believe that is one of HBH's basic challenges.
  3. You can do
if($pass=="whatever"){
echo "<html>rest of html</html>";
} else {
die("<html><h1>You are not permitted to view this page.</h1></html>");
}

I hope that helps you out :D


richohealey's Avatar
Python Ninja
0 0

ok, here's one for someoine that's good with PHP…. i have access to a server of a webpage, but some of the pages are hidden so that i can't look at them but the server can include them. is there a way of loadinbg the script (on the server end) as text and then putting that text in a page so i can look at it? what would the code lok like?


richohealey's Avatar
Python Ninja
0 0

ok, here's one for someoine that's good with PHP…. i have access to a server of a webpage, but some of the pages are hidden so that i can't look at them but the server can include them. is there a way of loadinbg the script (on the server end) as text and then putting that text in a page so i can look at it? what would the code lok like?


Flaming_figures's Avatar
Member
0 0

Thanks alot. WHat I'm doing is making a small missions site on like 100webs or something to just test out my friends etc. Did you answer the directory thing or am I just on the computer too early?


ghost's Avatar
0 0

the directory is just the folder name on the sever

rich, im not sure what your on about, use the include function ?

if you need help IM me


Flaming_figures's Avatar
Member
0 0

Im not that dumb, I just mean I am making this website and I was wondering how I make a directory look like a normal page. Like I have, "/realistic/real3/index.html" but I want to make realistic a page with small descriptions of the level, and real3 the full explination. I now have another question though (answer either) this one though is about my schools website (which I am also working on) I was wondering what a sciprt would look like to add an online notepad (this may also be included in my website) and how do I make a login system that only allows you to access YOUR files?[edit]Im Dumb, dumb dumb, and I get what you're saying. The the file index.php to the directory and you will be automatically re-directed to that page. Thank you alot!