Archive

Posts Tagged ‘PHP Script’

ByREV php Classes Timer – Determine execution time in PHP

February 21st, 2009 3 comments
ByREV php Classes Timer – Determine execution time in PHP Measuring PHP execution time with ByREV PHP Classes Timer. class ByRevTimer { public function StartTimer() { $GLOBALS['_byrev_timer_'][] = microtime(); return count( $GLOBALS['_byrev_timer_'] ) - 1; } function ReadTimer($id,$restart=true) { if (isset($GLOBALS['_byrev_timer_'][$id])) { $mtime = microtime(); $end_time = explode(" ",$mtime); $end_time = $end_time[1] ...

Hide Php Error Messages – How To !?

July 8th, 2008 No comments
Hide Php Error Messages – How To !? How can I hide PHP error messages in browser? in php.ini file (global settings for server): display_errors = Off Using the ini_set() function to set the value of this, you will have to do it every time you run the script though. <?php ini_set("display_errors", ...

Get IP address of the visitor , PHP Script

October 27th, 2007 1 comment
Get IP address of the visitor , PHP Script get ip funtion in (PHP) function getIP() { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; else if (isset($_SERVER['REMOTE_ADDR'])) $ip = $_SERVER['REMOTE_ADDR']; else $ip = "UNKNOWN"; return $ip; } This will show the IP address of the visitor the simple way: < ?php echo $_SERVER['REMOTE_ADDR']; ?>
GoCache - ByREV-Cache v1.0 - live served in : 0.781561 sec (gzip)