Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Что подразумевается под гео?
location сервака?
<?php
#error_reporting(0);
#set_time_limit(0);
#ignore_user_abort(1);
function cleardir()
{
$handle = opendir('report');
while (false !== ($file = readdir($handle)))
{
$del=preg_match('/(.*).txt/', $file, $out);
if ($del==1)
{
unlink("report/$out[0]");
}
}
}
function puturl($url, $code)
{
$fp=fopen("report/$code.txt", "a");
fwrite($fp, $url."\n");
fclose($fp);
}
cleardir();
include("geoip.inc.php");
$gi=geoip_open("GeoIP.dat",GEOIP_STANDARD);
$fp=fopen("urls.txt", "r");
while($link=trim(fgets($fp)))
{
$url=parse_url($link);
$ip=gethostbyname($url[host]);
$code=geoip_country_code_by_addr($gi, $ip);
puturl($link, $code);
}
fclose($fp);
geoip_close($gi);
echo "всё";
?>