How to display your server infomation!

Moderator: Lixas

Post Reply
blue-sky
Posts: 33
Joined: Tue Jun 12, 2007 3:41 pm

How to display your server infomation!

Post by blue-sky »

This is something that I thought would be usefull if you followed designstudios server tutorial, this would display some infomation about your server.Very Happy

Well first...You should check your PHP info...So create a PHP file and add this:

[PHP]
<?php
phpinfo();
?> [/PHP]


Now...If this doesn't show up anything...You havn't installed PHP correctly.Very Happy

Now...I will display how you can make a page displaying your server infomation + your visitors infomation...+ I will add a nice CSS style with it.Very Happy

Code: Select all

<html>
<head>
<title>Server + Your infomation - Yoursite.com</title>
<style type="text/css">
body
{
background-color:#003366;color:#0066FF;font-family:Verdana
}
</style>
</head>
<body>
<?php
echo "Server Infomation:";
echo "

Server Name: $_SERVER[SERVER_NAME]
IP Address: $_SERVER[SERVER_ADDR]
**** Root: $_SERVER[****_ROOT]

Server Software: $_SERVER[SERVER_SOFTWARE]";
echo 'Current PHP Version: ' . phpversion();
echo "

Your Infomation:";
echo "

Your IP Address: $_SERVER[REMOTE_ADDR]
Your Host Name: $_SERVER[REMOTE_HOST]

";
?>
</body>
</html> 

Done!!!


sakhan
Posts: 217
Joined: Sat May 26, 2007 6:02 am

Post by sakhan »

useful thanks for sharing
estine
Posts: 9
Joined: Fri Aug 17, 2007 9:05 am

Hmmmmmm

Post by estine »

what are you talking about???? im not the best at web design lol
Tails5
Posts: 1302
Joined: Wed Mar 15, 2006 8:09 am
Contact:

Post by Tails5 »

He's talking about displaying stuff like the server version, and the IP of the user on a web page.
Webmaster Yoda: You must confront the cPanel. Then, and only then, a webmaster will you be.
Julius Caesar: Veni, vidi, posti
Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

script

Post by Gebbo »

hmm.. i neva knew you could do that with php but from that it looks very interesting :) might make something like that..
.............................:: Spirit of Fire ::..................................

Image
Tails5
Posts: 1302
Joined: Wed Mar 15, 2006 8:09 am
Contact:

Post by Tails5 »

Infact, there's something like that in the phpBB3 Admin panel, it includes all the information about your server :)
Webmaster Yoda: You must confront the cPanel. Then, and only then, a webmaster will you be.
Julius Caesar: Veni, vidi, posti
jasondsouza
Posts: 348
Joined: Thu Jan 12, 2006 8:24 pm
Contact:

Post by jasondsouza »

well no wonder ... php is one of the best server side scripting language.. It can do anything and everything...
--jasondsouza
ME working on a very new site. (Coming soon)
Come to my web Site
Tails5
Posts: 1302
Joined: Wed Mar 15, 2006 8:09 am
Contact:

Post by Tails5 »

The only one better in my opinion is ASPX, but that's not strictly server side... it depends on your starting line, if you do <form id="form1" runat="server"> for Server Side, and set runat="client" for clientside :)
Webmaster Yoda: You must confront the cPanel. Then, and only then, a webmaster will you be.
Julius Caesar: Veni, vidi, posti
Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

script

Post by Gebbo »

nice it looks very good i might actually use that =)
.............................:: Spirit of Fire ::..................................

Image
Gio
Posts: 14
Joined: Wed Dec 26, 2007 5:10 pm

Post by Gio »

Ty man for that script;) yust need it
Post Reply