title: fatal error: call to undefined function validate_ip() in function.php
body: <pre>
              // check for shared internet/ISP IP
              if (!empty($_SERVER['HTTP_CLIENT_IP']) && validate_ip($_SERVER['HTTP_CLIENT_IP'])) {
                  return $_SERVER['HTTP_CLIENT_IP'];
              }
  
              // check for IPs passing through proxies
              if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
                  // check if multiple ips exist in var
                  if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {
                      $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
                      foreach ($iplist as $ip) {
                          if (validate_ip($ip))
                              return $ip;
                      }
                  } else {
                      if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))
                          return $_SERVER['HTTP_X_FORWARDED_FOR'];
                  }
              }
              if (!empty($_SERVER['HTTP_X_FORWARDED']) && validate_ip($_SERVER['HTTP_X_FORWARDED']))
                  return $_SERVER['HTTP_X_FORWARDED'];
              if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
                  return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
              if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && validate_ip($_SERVER['HTTP_FORWARDED_FOR']))
                  return $_SERVER['HTTP_FORWARDED_FOR'];
              if (!empty($_SERVER['HTTP_FORWARDED']) && validate_ip($_SERVER['HTTP_FORWARDED']))
                  return $_SERVER['HTTP_FORWARDED'];
  
              // return unreliable ip since all else failed
              return $_SERVER['REMOTE_ADDR'];
          }
  
          $url = "http://ipinfo.io/".get_ip_address()."/json";
  
          $json = file_get_contents($url);
  
          $obj = json_decode($json);
  </pre>
  
  <p>Please check this <a href="http://screencast.com/t/E9mlGvUt8J" rel="nofollow">http://screencast.com/t/E9mlGvUt8J</a> </p>