uawdijnntqw1x1x1
IP : 216.73.216.199
Hostname : webd002.cluster111.gra.hosting.ovh.net
Kernel : Linux webd002.cluster111.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
vertdeviaj
/
www.open
/
count
/
count.lib.php
/
/
<?php define('COUNT_ROOT_PATH', "/homez.210/vertdeviaj/www.open/count/data/"); function count_make($target){ return COUNT_ROOT_PATH.$target; } function count_make_addr($target){ return count_make($target).".addr"; } function count_make_clicks($target){ return count_make($target).".clicks"; } function count_make_users($target){ return count_make($target).".users"; } function count_check_target($target){ if (!strstr($target, "..") && !strstr($target, "/")){ $vsyn="#^[\w\-_]+$#"; return preg_match($vsyn, $target); } } function count_create($target, $url){ if(count_check_target($target)){ $users = count_make_users($target); $clicks = count_make_clicks($target); $addr = count_make_addr($target); if (!file_exists($users)){ $fd = fopen($users, "w"); fclose($fd); } if (!file_exists($clicks)){ $fd = fopen($clicks, "w"); fclose($fd); count_reset_clicks($clicks); } //if (!file_exists($addr)){ $fd = fopen($addr, "w"); fputs($fd, $url); fclose($fd); //} } } function count_register($target){ if(count_check_target($target)){ $file = count_make_users($target); if (file_exists($file)){ $fd = fopen($file, "a"); $agent = $_SERVER['HTTP_USER_AGENT']; $addr = $_SERVER['REMOTE_ADDR']; $date = date('Y-m-d H:i:s'); $val = "[".$date."]"."\t".$addr."\t".$agent."\n"; fputs($fd, strval($val)); fclose($fd); } } } function count_click($target){ if(count_check_target($target)){ $file = count_make_clicks($target); if (file_exists($file)){ $fd = fopen($file, "r+"); $val = fgets($fd); $val = intval($val); $val++; fseek($fd, 0); fputs($fd, strval($val)); fclose($fd); } } } function count_redirect($target){ if(count_check_target($target)){ $file = count_make_addr($target); if (file_exists($file)){ $fd = fopen($file, "r"); $val = fgets($fd); fclose($fd); header("Location: ".$val); exit(0); } } } function count_reset_clicks($file){ if (file_exists($file)){ $fd = fopen($file, "w"); $val=0; fputs($fd, strval($val)); fclose($fd); } } function count_empty($file){ if (file_exists($file)){ $fd = fopen($file, "w"); fclose($fd); } } function count_reset($target){ if(count_check_target($target)){ $users = count_make_users($target); $clicks = count_make_clicks($target); count_reset_clicks($clicks); count_empty($users); } } function count_reset_all(){ $dp = opendir(COUNT_ROOT_PATH); $list_files = null; $file = null; while ($file = readdir($dp)) if (strstr($file, ".clicks")) count_reset_clicks(count_make($file)); else if(strstr($file, ".users")) count_empty(count_make($file)); closedir($dp); } function count_read_unit($file){ if (file_exists($file)){ $fd = fopen($file, "r"); $val = fgets($fd); echo("<li><strong>".basename($file)."</strong> : ".strval($val)."</li>\n"); fclose($fd); } } function count_read_clicks(){ echo("<html><head></head><body><ul>"); $dp = opendir(COUNT_ROOT_PATH); $list_files = array(); $file = null; $i = 0; while ($file = readdir($dp)){ if (strstr($file, ".clicks")){ $list_files[$i] = count_make($file); $i++; } } closedir($dp); if(count($list_files) != 0) sort($list_files); foreach($list_files as $unit) count_read_unit($unit); echo("</ul></body></html>"); } function count_read_users($target){ if(count_check_target($target)){ $file = count_make_users($target); if (file_exists($file)){ echo(nl2br(file_get_contents($file))); } } } ?>
/home/vertdeviaj/www.open/count/count.lib.php