PHP Get IP

Simple PHP acquisition function:

 / ** Get IP * / FUNCTION Getip () {if (Getenv ('http_client_ip') {$ p = GetENV ( 'HTTP_CLIENT_IP');} elseif (getenv ( 'HTTP_X_FORWARDED_FOR')) {$ IP = getenv ( 'HTTP_X_FORWARDED_FOR');} elseif (getenv ( 'HTTP_X_FORWARDED')) {$ IP = getenv ( 'HTTP_X_FORWARDED');} elseif (GetENV ('http_forwarded_for')) {$ ip = getenv ('http_forwarded_for');} elseif (GetENV ('http_forwarded')) {$ ip = getenv ('http_forwarded');} else {$ ip = $ _server [' REMOTE_ADDR '];} if ($ _ get [debug')) {return $ _GET ['Debug'];} Return $ IP;}   


© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment