PriviMetrics
Version 1.0.9 • 43 files • 278.98 KB
Files
.last_check
admin.php
assets/.htaccess
assets/dashboard-chart.php
assets/dashboard-logic.php
assets/dashboard-modals.php
assets/dashboard-tables.php
assets/dashboard-template.php
assets/trends-template.php
chosen-limits.php
dashboard.php
data/.htaccess
extensions-load.php
extensions.php
extensions.xml
extensions/.htaccess
extensions/extensions_off.txt
functions.php
getCountryFrom/db-ip.php
getCountryFrom/geo-lite.php
getCountryFrom/ip-api-com.php
getCountryFrom/ip-info.php
getCountryFrom/ip-stack.php
getCountryFrom/ip2location-io.php
getCountryFrom/privacy-friendly.php
index.html
install.php
limits-options.php
new_version.php
privimetrics-div.js
privimetrics.php
public.php
scripts.js
settings-config.php
settings.php
signup.php
storage.php
styles-mobile.css
styles.css
trends.css
trends.php
updater/index.php
version.txt
getCountryFrom/ip-stack.php
<?php
function fetchLocationIpstack($ip, $apiKey) {
$url = "http://api.ipstack.com/{$ip}?access_key={$apiKey}"; // @user-config // Your ipstack API endpoint
$response = @file_get_contents($url);
if ($response) {
$data = json_decode($response, true);
if ($data && isset($data['country_name'], $data['country_code'])) {
return [
'country' => $data['country_name'],
'code' => $data['country_code']
];
}
}
return ['country' => 'Unknown', 'code' => 'XX'];
}