真 戸 暁
Coder
I have such an iplogger with a report in a telegram, taken from here githab . The code itself:
Is it possible to change the code so that it works for a specific download link? I create a direct download link to use in different articles, so that users can download files without going to the site itself. But in this case, the ip logger doesn't work and I can't get the data.
I just met with programming and don't understand, please show me step by step if possible.
ip logger is used to collect information and then analyze the effectiveness of advertising aimed at specific cities.
PHP:
<?php
function telegram($msg) {
global $telegrambot,$telegramchatid;
$url = 'https://api.telegram.org/bot'.$telegrambot.'/sendMessage';$data = array('chat_id'=>$telegramchatid,'text'=>$msg);
$options = array('http'=>array('method' => 'POST','header' => "Content-Type:application/x-www-form-urlencoded\r\n",'content' => http_build_query($data),),);
$context = stream_context_create($options);
$result = file_get_contents($url,false,$context);
return $result;
}
$telegrambot = '1318525370:AAEXFi11J4LGARh62fqnj0vD9QkN1r8946s'; // enter bot token
$telegramchatid = 1085665214; // enter chat id
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];
$ipapi = json_decode(file_get_contents("http://ip-api.com/json/{$ip}"));
$datetime = date("g:ia, l F j Y"); // g:ia l F j Y l, F j, Y, g:ia
telegram("New user:
IP : $ip
Browser : $userAgent
Country : $ipapi->country ($ipapi->countryCode)
Region : $ipapi->regionName ($ipapi->region)
City : $ipapi->city
Zip (Postcode) : $ipapi->zip
Time : $datetime
Internet Provider : $ipapi->isp ($ipapi->org)
");
// Operating system $user_os
// Browser $user_browser
?>
<?php
<source>
?>
I just met with programming and don't understand, please show me step by step if possible.
ip logger is used to collect information and then analyze the effectiveness of advertising aimed at specific cities.