getting server/script information
We currently hava script that logs infomation when we link to an outside website. It is in php, but I need to convert it to java. Could someone please help me? Below is the PHP code:
function log_and_redirect($where){
global $SCRIPT_FILENAME,
$SERVER_ADDR,
$SERVER_NAME,
$SCRIPT_NAME;
$to=base64_encode($where);
$from=base64_encode("http://$SERVER_NAME$SCRIPT_NAME");
$redirect_string="/redir/?go=$to&from=$from";
return $redirect_string;
}
Thanks!!!

