M
M
Mark_Light2021-07-15 11:43:49
PHP
Mark_Light, 2021-07-15 11:43:49

How to get Useragent and ip using php on form submission?

Good afternoon! Interested in a way to get Useragent and user ip using php when submitting a form.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Bay, 2021-07-15
@kawabanga

https://g.zeos.in/?q=%D1%81%D0%BF%D0%BE%D1%81%D0%B... .

R
Roman Morozov, 2021-10-08
@Q_BASIC

IP in $_SERVER['REMOTE_ADDR']
Useragent in $_SERVER['HTTP_USER_AGENT']
Useragent can still be obtained via JS, it sometimes happens differently - navigator.userAgent. More often this happens when they are replaced through an extension. Here you can check in js and through the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question