View file clikus/config/oper.etc.php

File size: 1.85Kb
<?php
//make for clikus.ru
//Admin icq 91531

	$ip = @$_SERVER['REMOTE_ADDR'];
	////////// Дописываем мод определителя.
	$opera = array(ip2long("195.189.142.0"),ip2long("195.189.143.255"),
				   ip2long("193.69.116.0"),ip2long("193.69.116.127"),
				   ip2long("91.203.96.0"),ip2long("91.203.99.255"),
				   ip2long("80.232.117.0"),ip2long("80.232.117.255"),
				   ip2long("94.246.126.0"),ip2long("94.246.126.255"),
				   ip2long("67.228.166.0"),ip2long("67.228.166.255"),
				   ip2long("91.145.248.0"),ip2long("91.145.248.255"),
				   ip2long("91.145.230.0"),ip2long("91.145.230.255"),
				   ip2long("79.124.186.0"),ip2long("79.124.186.255"),
				   ip2long("91.145.0.0"),ip2long("91.145.255.255"),
				   );
	$ipk = ip2long($ip);
	 
	
	$ua = str_replace('windows ce', '', strtolower($_SERVER['HTTP_USER_AGENT']));


	$my_type=1; //// мобилко
	$brow = 'Мобильник';
	
	if (strpos($ua, 'mini') !== false)
	$my_type=2; //// Оперилло
	
	if (strpos($ua, 'windows') !== false ||
	     strpos($ua, 'linux') !== false ||
	     strpos($ua, 'bsd') !== false ||
	     strpos($ua, 'x11') !== false ||
	     strpos($ua, 'unix') !== false ||
	     strpos($ua, 'macintosh') !== false ||
	     strpos($ua, 'macos') !== false)
	{
		$my_type=3; //// Компище
		$brow = 'Компьютер';
	}
	
	if( $ipk >= $opera[0] and $ipk <= $opera[1] or
		$ipk >= $opera[2] and $ipk <=$opera[3] or
		$ipk >= $opera[4] and $ipk <=$opera[5] or
		$ipk >= $opera[6] and $ipk <=$opera[7] or
		$ipk >= $opera[8] and $ipk <=$opera[9] or
		$ipk >= $opera[10] and $ipk <=$opera[11] or
		$ipk >= $opera[12] and $ipk <=$opera[13] or
		$ipk >= $opera[14] and $ipk <=$opera[15] or
		$ipk >= $opera[16] and $ipk <=$opera[17] or
		$ipk >= $opera[18] and $ipk <=$opera[19])
	{
		$my_type=2; //// Оперилло
		$brow = 'Мини-Опера';
	}
	
	
	
//make for clikus.ru
//Admin icq 91531
?>