Minor - Updated to preg_split

1.9.x
Yannick Warnier 11 years ago
parent 5a14da7845
commit c2d10cd6d5
  1. 2
      main/webservices/testip.php

@ -5,7 +5,7 @@
*/
$ip = trim($_SERVER['REMOTE_ADDR']);
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
list($ip1,$ip2) = split(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
list($ip1,$ip2) = preg_split('/,/',$_SERVER['HTTP_X_FORWARDED_FOR']);
$ip = trim($ip1);
}
echo htmlentities($ip);

Loading…
Cancel
Save