hello, I have a question here. There are 2 server, server A and server B. There are also 2 cgi files. access-ip.cgi store in server A. ip.cgi store in server B. The access-ip.cgi looks like this: #!/usr/bin/perl print "Content-type: text/html\n\n"; use LWP::Simple; @testing=get('http://www.serverB.com/cgi-bin/ip.cgi'); print @testing; -- The ip.cgi on server B looks like this: #!/usr/bin/perl $add=$ENV{'REMOTE_ADDR'}; print "Content-type: text/html\n\n"; print "<p>IP is $add\n" So, how do I pass/set the environment variable of REMOTE_ADDR from server A ? So that I can control the env of remote_addr at the server B ? access-ip.cgi actually get the output from server B, and server B actually get the remote_addr value from server A. So, is there any way I can make $ENV{'REMOTE_ADDR'}="1.2.3.4"; from server A, And pass this variable to server B. So, server B will take 1.2.3.4 as the value of remote_addr, and as a result, access-ip will give an output of 1.2.3.4. I have tried the following code in modperl, my $r = shift; $r->connection->remote_ip('1.2.3.4'); it only works in server A, meaning, $ENV{'REMOTE_ADDR'} in Server A return 1.2.3.4, but $ENV {'REMOTE_ADDR'} in server B still return the Server A ip address. Thank you very much. [EMAIL PROTECTED] |
- Re: Changing REMOTE_ADDR passing to a request. Alson Wong
- Re: Changing REMOTE_ADDR passing to a request. barries
- Re: Changing REMOTE_ADDR passing to a reque... Alson Wong
- Re: Changing REMOTE_ADDR passing to a r... Bogomolnyi Constantin
- Re: Changing REMOTE_ADDR passing to a r... barries