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!!!

[664 byte] By [jrthor2a] at [2007-10-2 12:58:58]
# 1
I suggest getting an intro PHP book or STFW to familiarize yourself with PHP. Unless you want to subcontract us out, we're not going to continue to do your PHP to Java conversions for you.
bckrispia at 2007-7-13 10:17:26 > top of Java-index,Java Essentials,Java Programming...
# 2
I am a php programmer, and unfortunately a new java developer, so that's why I am asking for help.Sorry for the ignorance...
jrthor2a at 2007-7-13 10:17:26 > top of Java-index,Java Essentials,Java Programming...
# 3
> I am a php programmer, and unfortunately a new java> developer, so that's why I am asking for help.> > Sorry for the ignorance...Interesting, considering you created a profile on the Java forums over 2 years ago.
warnerjaa at 2007-7-13 10:17:26 > top of Java-index,Java Essentials,Java Programming...
# 4
Yep, and still learning
jrthor2a at 2007-7-13 10:17:26 > top of Java-index,Java Essentials,Java Programming...