24
March
I want to know IP Address of my website so can who is visiting or I want to location where is website visited using IP address.
Soln,
Add this code at top like other header
use Symfony\Component\HttpFoundation;
Use this code to get IP Address
\Drupal::request()->getClientIp()
© 2023.ZedAngle. All Rights Reserved.