PHP Code to Display Server IP Address

Use the following code if you want to display Server IP Address. Simply copy the code in text file & save as .php file in the server.

For Linux with Apache/Litespeed Server use

<?php
echo $_SERVER['SERVER_ADDR'];
?>

For Windows 2008 R2 with IIS 7.5 Server use

<?php
echo $_SERVER['LOCAL_ADDR'];
?>

How to Host Static & Dynamic Page (PHP) in Windows Server 2008 R2

This is just a summary on how to host static & dynamic page in Windows Server 2008 R2. For detail’s guide click on the link in the step by step guides below. Credit to TrainSignal for the detail’s guides.

  1. Install Internet Information Services (IIS)
  2. Install PHP
  3. Install MySQL Database

After completion, you should be able to host static & dynamic page. Dynamic website such as WordPress should work well.