-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the client's IP #10
Comments
Comet always stays in memory and do not work nor changes GLOBALS and SERVER arrays from request to request. So you should use some workaround like this Workerman method to get real IP: Thanks for great question, we should implement more straightforward way to get that info. |
Add please. |
As of latest Comet v1.1.2 you can get the client's IP address from REMOTE_ADDR attribute of ServerParams: $params = $request->getServerParams(); |
Привет! У меня тоже проблема получить IP адрес юзера $request->getServerParams(); возвращает другой набор переменных.
SSH_CLIENT - В принципе отдает IP но не чистый на край конечно его можно использовать но меня смутило что в твоем примере есть даже переменная REMOTE_ADDR `http {
}` |
I tried to add RKA\Middleware\IpAddress and get the client's IP, but it doesn't work.
$_SERVER['REMOTE_ADDR'] also doesn't work. How to fix this?
The text was updated successfully, but these errors were encountered: