⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
ppt.com.ng
/
app
/
Traits
/
View File Name :
NotificationTrait.php
first()['id']; $ipAddress = self::getUserIp(); $previousIpWithCountry = Notification::where('ip_address', $ipAddress)->whereNotNull(['city', 'country'])->first(); $authUser = Auth::user(); Notification::create([ 'user_id' => $userId, // for which user the activity is being created 'type_id' => $id, // the type of activity 'message' => $message, 'user_type' => $userType, // who has created activity, role name 'ip_address' => $ipAddress, 'created_by' => $authUser['id'], // who created the activity, sometimes NULL, sometimes will be the same as user_id 'city' => @$previousIpWithCountry['city'], 'country' => @$previousIpWithCountry['country'], 'show_to_super_admin' => $showToSuperAdmin, 'show_to_admin' => $showToAdmin ]); } catch (\Exception $exception) { Log::info('activity_error', array($exception->getMessage())); } } public static function getUserIp() { if (isset($_SERVER['HTTP_CLIENT_IP'])) return $_SERVER['HTTP_CLIENT_IP']; else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR']; else if (isset($_SERVER['HTTP_X_FORWARDED'])) return $_SERVER['HTTP_X_FORWARDED']; else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) return $_SERVER['HTTP_FORWARDED_FOR']; else if (isset($_SERVER['HTTP_FORWARDED'])) return $_SERVER['HTTP_FORWARDED']; else if (isset($_SERVER['REMOTE_ADDR'])) return $_SERVER['REMOTE_ADDR']; else return 'UNKNOWN'; } }