Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question