echo arsc_filter_posting($arsc_a["user"], $arsc_a["sendtime"], $arsc_a["message"], $arsc_room, $arsc_a["flag_ripped"])."\n";
}
$arsc_ping = time();
- $arsc_ip = getenv("REMOTE_ADDR");
+ $arsc_ip = getremoteaddr();
mysql_query("UPDATE arsc_users SET lastping = '$arsc_ping', ip = '$arsc_ip' WHERE user = '$arsc_user'");
?>
<a name="end"></a>
}
$arsc_lastid = $arsc_lastid_save;
$arsc_ping = time();
- $arsc_ip = getenv("REMOTE_ADDR");
+ $arsc_ip = getremoteaddr();
mysql_query("UPDATE arsc_users SET lastping = '$arsc_ping', ip = '$arsc_ip' WHERE sid = '$arsc_sid'");
echo " ";
flush();
$arsc_message = "/msg ".$arsc_my["user"]." ".$arsc_lang["welcome"];
echo arsc_filter_posting("System", $arsc_sendtime, $arsc_message, $arsc_room, 0);
$arsc_ping = time();
- $arsc_ip = getenv("REMOTE_ADDR");
+ $arsc_ip = getremoteaddr();
mysql_query("UPDATE arsc_users SET lastping = '$arsc_ping', ip = '$arsc_ip' WHERE user = '$arsc_user'");
?>
</body>
}
/// Check subnet access
- if ($quiz->subnet and !address_in_subnet($_SERVER['REMOTE_ADDR'], $quiz->subnet)) {
+ if ($quiz->subnet and !address_in_subnet(getremoteaddr(), $quiz->subnet)) {
error(get_string("subneterror", "quiz"), "view.php?id=$cm->id");
}
if ((EWIKI_LOGLEVEL >= 0) && ($error_type <= EWIKI_LOGLEVEL)) {
$msg = time() . " - " .
- $_SERVER["REMOTE_ADDR"] . ":" . $_SERVER["REMOTE_PORT"] . " - " .
+ getremoteaddr() . ":" . $_SERVER["REMOTE_PORT"] . " - " .
$_SERVER["REQUEST_METHOD"] . " " . $_SERVER["REQUEST_URI"] . " - " .
strtr($msg, "\n\r\000\377\t\f", "\r\r\r\r\t\f") . "\n";
error_log($msg, 3, EWIKI_LOGFILE);
function ewiki_author($defstr="") {
$author = @$GLOBALS["ewiki_author"];
- ($ip = &$_SERVER["REMOTE_ADDR"]) or ($ip = "127.0.0.0");
+ ($ip = getremoteaddr()) or ($ip = "127.0.0.0");
($port = $_SERVER["REMOTE_PORT"]) or ($port = "null");
$hostname = gethostbyaddr($ip);
$remote = (($ip != $hostname) ? $hostname . " " : "")
if (!defined("STR_ROT17")) {
$i = @$_SERVER["SERVER_SOFTWARE"] .
@$_SERVER["HTTP_USER_AGENT"] .
- @$_SERVER["REMOTE_ADDR"];
+ getremoteaddr();
$i .= 'MxQXF^e-0OKC1\\s{\"?i!8PRoNnljHf65`Eb&A(\':g[D}_|S#~3hG>*9yvdI%<=.urcp/@$ZkqL,TWBw]a;72UzYJ)4mt+ V';
$f = "";
while (strlen($i)) {
switch ($dom = $domains[rand(0, $n_dom)]) {
case "123webhosting.org":
- $m = strtr(".", "-", $_SERVER["REMOTE_ADDR"])."-".$_SERVER["SERVER_NAME"]."-".time();
+ $m = strtr(".", "-", getremoteaddr())."-".$_SERVER["SERVER_NAME"]."-".time();
break;
default:
}
-?>
\ No newline at end of file
+?>