//W3C
//DTD HTML 4.01 Transitional
//EN"> Introduction to php server variables for beginners. Learn php server variables basics
Amazon.com: PC Books || Educational Software || Magazines
Amazon: Books-CA || Software-CA || Books-UK || Software-UK

HTML | Javascript | ASP | PHP | VBScript | SQL | Hardware | PC FAQ| WinXP|

Learn to Build, Upgrade, or Repair your Computer Ebook + PC Safety 101 kwwebservice.com Reasonably priced web development & hosting
PHP Basics
Introduction
Variables & Arrays
Sub & Functions
If Statements
Case Statements
Loop Statements
Date Objects
Form Processing
Text File Objects
Database Access
Adding Record
Updating Record
Deleting Record
Virtual Includes
Cookies
Session
Server Variables
Creating Login Page
E-mail
PHP Books @
CA Amazon
UK Amazon
US Amazon

  :: Home
PC Topics
  :: Build A PC
  :: Windows XP
  :: PC Help
Tutorials
  :: HTML
  :: JavaScript
  :: ASP
  :: PHP
  :: VBScript
  :: SQL
Miscellaneous
  :: Code/Scripts
  :: Forum
  :: Links
  :: Contact us
  :: Tell A Friend
  :: In Somali
  ::
Web Articles
  Top Web Hosting
Reviews
  Processing
Online Card Payment Guide
  Domain name
registration & buying guide
  Getting
a website online guide
  Search Engine
submission & optimization tips
Netfirms Web Hosting
Free trial
Quality business correspondence.
Yahoo! Search Marketing


PHP Server Variables

The following example demonstrates how to retrieve some of the useful server variables.
<?php
$agent = $_SERVER["HTTP_USER_AGENT"];

//Gets the browser type
$ip=$_SERVER['REMOTE_ADDR'];

//Retrieves the user IP Address
$serverName=$_SERVER["SERVER_NAME"];

//Retrieves the name of the hosting server.
$ref = $_SERVER["HTTP_REFERER"];

//Retrieves the referer url
$soft=$_SERVER["SERVER_SOFTWARE"];

//Retrieves server identification string
serverPort=$_SERVER("
//REMOTE_PORT")

//Retrieves server port
$scriptName=$_SERVER["SCRIPT_FILENAME"];

//Retrieves pathname of the running script
$soft=$_SERVER["SERVER_SOFTWARE"];

//Retrieves server software
$spt=$_SERVER["SERVER_PROTOCOL"];

//Retrieves page url
$method=$_SERVER["REQUEST_METHOD"];

//Retrieves request mehtod .. get or post
?>
<?php
print "User Agent: $agent<br>";
print "IP Address: $ip<br>";
print "Remote host IP: $serverName<br>";
print "Server Domain name: $ref<br>";
print "Referer page: $soft<br>";
PRINT "Server Port: $scriptName<br>";
PRINT "Server protocol: $scriptName<br>";
PRINT "Method: $method<br>";
?>
Session Create login page
Listed @ ConsumerVote.com - The Consumer Rated Web Directory
PC Articles
  Computer Safety
prevent viruses & Spyware