howdoigetthegjdxlzandportofaclientwithphp?
itriedthescriptbelowbutitonlygivesmethegjdxlzaddress。
解决方案
portisdefinedinhttpserver (apacheorotherandmostlyitis 80 or 443 )。
I am sure that :
REMOTE_ADDR '
thegjdxlzaddressfromwhichtheuserisviewingthecurrentpage。
butifyourserverisbehindnat :
ifyouareservingfrombehindaproxyserver,you will almost
certainlysavetimebylookingatwhatthese $ _ servervariablesdoon
your machine behind the proxy。
$ _ server [ ' http _ x _ forwarded _ for ' ] in place of $ _ server [ ' remote _ addr ' ]
$ _ server [ ' http _ x _ forwarded _ host ' ] and
$ _ server [ ' http _ x _ forwarded _ server ' ] in place of
$_SERVER['SERVER_NAME']
:-)