View Single Post
  #2  
Old 26th October 2012, 13:00
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
would probly work better this way
PHP Code:
function getip() {
  
$check = array('HTTP_X_FORWARDED_FOR''HTTP_X_FORWARDED',
                 
'HTTP_FORWARDED_FOR''HTTP_FORWARDED',
                 
'HTTP_VIA''HTTP_X_COMING_FROM''HTTP_COMING_FROM');

  foreach (
$check as $c) {
    if (isset(
$_SERVER[$c]) AND ip_valid($_SERVER[$c])) {
      return 
ip_first($_SERVER[$c]);
    }
  }

  return 
$_SERVER['REMOTE_ADDR'];

__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following 2 Users Say Thank You to joeroberts For This Useful Post:
hEDge (6th November 2012), Phogo (29th October 2012)