Файловый менеджер - Редактировать - /home/d46091/gemregistrationportal.org/get-client-ip.php
Назад
<?php date_default_timezone_set('Asia/Kolkata'); $visitor_time_date = urlencode(date('d-m-Y H:i:s')); $visitor_website = urlencode(strtoupper($_SERVER['HTTP_HOST'])); function get_visitor_ip() { $ip_address = ''; if (getenv('HTTP_CLIENT_IP')) { $ip_address = getenv('HTTP_CLIENT_IP'); } else if(getenv('HTTP_X_FORWARDED_FOR')) { $ip_address = getenv('HTTP_X_FORWARDED_FOR'); } else if(getenv('HTTP_X_FORWARDED')) { $ip_address = getenv('HTTP_X_FORWARDED'); } else if(getenv('HTTP_FORWARDED_FOR')) { $ip_address = getenv('HTTP_FORWARDED_FOR'); } else if(getenv('HTTP_FORWARDED')) { $ip_address = getenv('HTTP_FORWARDED'); } else if(getenv('REMOTE_ADDR')) { $ip_address = getenv('REMOTE_ADDR'); } else { $ip_address = 'UNKNOWN'; } return $ip_address; } $visitor_ip = urlencode(get_visitor_ip()); $visitor_webpage = urlencode((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); // echo '<div>' . $visitor_time_date . '</div>'; // echo '<div>' . $visitor_website . '</div>'; // echo '<div>' . $visitor_ip . '</div>'; // echo '<div>' . $visitor_webpage . '</div>'; if ($visitor_website == 'LOCALHOST') { $ch = curl_init('http://localhost/crm2.techlounge.co.in/api/visitor-ip.php?visitorTimeDate='.$visitor_time_date.'&visitorWebsite='.$visitor_website.'&visitorIp='.$visitor_ip.'&visitorWebpage='.$visitor_webpage.''); } else { $ch = curl_init('https://crm2.techlounge.co.in/api/visitor-ip.php?visitorTimeDate='.$visitor_time_date.'&visitorWebsite='.$visitor_website.'&visitorIp='.$visitor_ip.'&visitorWebpage='.$visitor_webpage.''); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка