PHP

How to Disable Statistic Data Collection in phpMyDirectory?

phpMyDirectory statistic data take a huge chunk of database space in MySQL. If you do not require the data, it is wise to disable the data collection as well.

To disable you have to edit the following file.

/includes/class_statistics.php

Find the following code

 if(BOT) {
 return false;
 }
 

and change it to

 if(true) {
 return false;
 }
 

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'];
?>