Skip to content

Instantly share code, notes, and snippets.

@swaters86
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swaters86/789c0aedd29c82e148f5 to your computer and use it in GitHub Desktop.
Save swaters86/789c0aedd29c82e148f5 to your computer and use it in GitHub Desktop.
$userAgentString = $SOSE->ENV("USERAGENT");
if (preg_match("/iOpus/i", $userAgentString)) {
//$SOSE->Echo("A match was found.");
$ipaddress = $SOSE->ENV("CLIENTIP");
$fp = fopen('\\\\sxatl\\sx1\\SX1\\Web\\FD\\logs\\spammeripaddress.txt', 'w');
fwrite($fp, "ip addrss is: " . $ipaddress );
fclose($fp);
$SOSE->Redirect("/section/nojs");
} else {
//$SOSE->Echo("A match was not found.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment