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.
Дайте пожалуйста скрипт определения url на котором в данный момент находится юзер, чтобы его можно было вставить в любую часть страницы
смотриш на кого зарегистрирован айпи адресс, т.е. парсиш любой whois сервис.А можно немного другой вопрос, как определить интернет провайдера юзера?
А можно немного другой вопрос, как определить интернет провайдера юзера?
<?php
if (!defined('BLOCK_FILE')) {
Header("Location: ../index.php");
exit;
}
global $db, $prefix, $ip;
$result = $db->sql_query("SELECT date, hits, list_hosts, all_hosts, record FROM ".$prefix."_statistic WHERE date>='".date("Y-m-d", strtotime(date("Y-m-d"))-6*60*60*24)."'");
$i=1;
$stat_arr[1] = 0; $stat_arr[2] = 0; $stat_arr[3] = 0; $stat_arr[4] = 0;
$stat_arr[5] = 0; $stat_arr[6] = 0; $stat_arr[0] = 0;
if ($db->sql_numrows($result)==0) $db->sql_query("INSERT INTO ".$prefix."_statistic (date, hits, list_hosts, all_hosts, record) VALUES ('".date("Y-m-d")."', '1', '".$ip.",', '1', '1')");
while(list($date, $hits, $list_hosts, $all_hosts, $record) = $db->sql_fetchrow($result)){
if ($i==$db->sql_numrows($result)){
$hits++;
if ($date!=date("Y-m-d")){
$result = $db->sql_query("SELECT date, hits, list_hosts, all_hosts, record FROM ".$prefix."_statistic ORDER BY date DESC LIMIT 1");
list($date, $hits, $list_hosts, $all_hosts, $record) = $db->sql_fetchrow($result);
$content = "yes";
if ($db->sql_numrows($result)==0){
$db->sql_query("INSERT INTO ".$prefix."_statistic (date, hits, list_hosts, all_hosts, record) VALUES ('".date("Y-m-d")."', '1', '".$ip.",', '1', '1')");
} else {
$all_hosts++;
$list_hosts_arr = explode(",", $list_hosts);
if(count($list_hosts_arr)-1>$record) $record = count($list_hosts_arr)-1;
$db->sql_query("INSERT INTO ".$prefix."_statistic (date, hits, list_hosts, all_hosts, record) VALUES ('".date("Y-m-d")."', '1', '".$ip.",', '".$all_hosts."', '".$record."')");
}
} else {
if (strpos($list_hosts, $ip.",")===false){
$list_hosts.=$ip.",";
$all_hosts++;
$list_hosts_arr = explode(",", $list_hosts);
if(count($list_hosts_arr)-1>$record) $record = count($list_hosts_arr)-1;
}
$db->sql_query("UPDATE ".$prefix."_statistic SET hits='".$hits."', list_hosts='".$list_hosts."', all_hosts='".$all_hosts."', record='".$record."' WHERE date='".date("Y-m-d")."'");
}
$hist_set = $hits;
$set_all_hosts = $all_hosts;
$set_record = $record;
}
$stat_arr[date("w", strtotime($date))]=count(explode(",", $list_hosts))-1;
$i++;
}
$stat_arr[date("w")] = "<b>".$stat_arr[date("w")]."</b>";
$content = "<table width=\"100%\">
<tr><td>"._MONDAY."</td><td align=\"right\">".$stat_arr['1']."</td></tr>
<tr><td>"._TUESDAY."</td><td align=\"right\">".$stat_arr['2']."</td></tr>
<tr><td>"._WEDNESDAY."</td><td align=\"right\">".$stat_arr['3']."</td></tr>
<tr><td>"._THURSDAY."</td><td align=\"right\">".$stat_arr['4']."</td></tr>
<tr><td>"._FRIDAY."</td><td align=\"right\">".$stat_arr['5']."</td></tr>
<tr><td>"._SATURDAY."</td><td align=\"right\">".$stat_arr['6']."</td></tr>
<tr><td>"._SUNDAY."</td><td align=\"right\">".$stat_arr['0']."</td></tr>
<tr><td colspan=\"2\"><HR></td></tr>
<tr><td style=\"padding-right: 10px; float: left;\">"._THISDAYHITS.":</td><td align=\"right\">".$hist_set."</td></tr>
<tr><td style=\"padding-right: 10px; float: left;\">"._ALLQUANT.":</td><td align=\"right\">".$set_all_hosts."</td></tr>
<tr><td style=\"padding-right: 10px; float: left;\">"._RECORDQUANT.":</td><td align=\"right\">".$set_record."</td></tr>
</table>";
?>