Просмотр файла superkat/oper.php

Размер файла: 14.81Kb
<?
if (eregi("oper.php",$PHP_SELF))
{
	//Header("Location: index.php");
	die();
}
$oper= trim(htmlspecialchars(stripslashes(@$_GET['oper'])));
$oper = @preg_replace("/[^0-9]/", "", $oper);

if($oper != "")
{
	if($oper < 0 or $oper>54)
	{
		$oper = 0;
	}

}else{
$ip = @$_SERVER['REMOTE_ADDR'];

		$ips = split("\.", $ip);
		@$ipnum = $ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256;
		$oper = 0;
		$IP101 = array(1402273792,1402277888,1402279936,1402281984,1402284032,1402286080,1402287104,3251233792,3582031776,3647627136,2886764544);
		$IP201 = array(1402275839,1402278911,1402280959,1402283007,1402285055,1402287103,1402288127,3251234815,3582031807,3647627143,2886765568);
		$IP102 = array(1433657344,3648405504,3648406528,3648408576,3648409600,3648410624,3648411648,3648412672,3582418944,3232238080);
		$IP202 = array(1433657599,3648406527,3648407551,3648409599,3648410623,3648411647,3648412671,3648413695,3582423039,3232238335);
		$IP103 = array(1047070464,1401450496,1401451520,1406861312,1425989632,1441366016,3272364544,3564675072,3564676832,3571187712,3641816064,3641816576,1494507776);
		$IP203 = array(1047072255,1401450751,1401451775,1406869503,1425994239,1441371903,3272364799,3564683263,3564676863,3571253247,3641816319,3641816831,1494508031);
		$IP104 = array(1347599104,3588519936,926563328);
		$IP204 = array(1347599359,3588520447,926563583);
		$IP105 = array(1042394624,1346950400,1347674112,1360933376,1372794624,1410457600,3258356736,3277188608,3281465344,3287259392,3559689216,3562834880,3578831872,3579259392,3579267072,3579269120,3641237504,3641237504,3645018112,3645566976,3648478720,3283979776);
		$IP205 = array(1042394879,1346950655,1347678207,1360933887,1372794879,1410459647,3258357759,3277188863,3281465599,3287259647,3559689471,3562834943,3578832127,3579265535,3579267935,3579273215,3641241599,3641240575,3645019135,3645569023,3648479231,3283980031);
		$IP106 = array(1404043264,2197028864);
		$IP206 = array(1405091839,2197094399);
		$IP107 = array(3650368512,2885812736);
		$IP207 = array(3650368767,2885812991);
		$IP108 = array(3278955480,3278956288,3278960128);
		$IP208 = array(3278955515,3278956543,3278960383);
		$IP109 = array(1389383040,1432330240,3282161664,3282171904,3585171456,167772928);
		$IP209 = array(1389383167,1432334335,3282163711,3282173951,3585174271,167773183);
		$IP110 = array(1346736128,3260286336,3645731072);
		$IP210 = array(1346737151,3260286463,3645731079);
		$IP111 = array(3648294912);
		$IP211 = array(3648295935);
		$IP112 = array(1481787392,3652001536,1506762753);
		$IP212 = array(1481787647,3652001599,1506764798);
		$IP113 = array(1052193280,1347125248,1347125248,1347126528,3589409280);
		$IP213 = array(1052193535,1347129343,1347125759,1347127167,3589409535);
		$IP114 = array(1358118912,1358119680);
		$IP214 = array(1358119423,1358123007);
		$IP115 = array(1406740480,1406741504,3564593152,3564595968,3564599808,3565248512,3565250048,3565250560,3578853376,3648215680);
		$IP215 = array(1406741503,1406743551,3564593407,3564596735,3564601343,3565256703,3565250559,3565254655,3578854079,3648215807);
		$IP116 = array(3651751936,3651752192,3651755008);
		$IP216 = array(3651752191,3651752447,3651756031);
		$IP117 = array(3287244288);
		$IP217 = array(3287244543);
		$IP118 = array(3645317120);
		$IP218 = array(3645318015);
		$IP119 = array(3268669440,3268149760,1475938304);
		$IP219 = array(3268673535,3268150015,1475938559);
		$IP120 = array(2197028864);
		$IP220 = array(2197094399);
		$IP121 = array(3588390912,1410269184); 
		$IP221 = array(3588391935,1410334719);
		$IP122 = array(3266322432);
		$IP222 = array(3266322687);
		$IP123 = array(2197028864);
		$IP223 = array(2197094399);
		$IP124 = array(2197028864);
		$IP224 = array(2197094399);
		$IP125 = array(3562882304);
		$IP225 = array(3563086079);
		$IP126 = array(1358905344,1358905344,1358907392,1358907648,1358907904,1358908160,1358908416,1358908672,1358908928,1358909184,1490436096);
		$IP226 = array(1358909439,1358905471,1358907647,1358907903,1358908159,1358908415,1358908671,1358908927,1358909183,1358909439,1490444287);
		$IP127 = array(1536278528,1536278528,3560611840,3560611840,3560612352,3560612864,3560613888,3560615936);
		$IP227 = array(1536294911,1536286719,3560620031,3560612095,3560612863,3560613887,3560615935,3560620031);
		$IP128 = array(3253698560);
		$IP228 = array(3253699071);
		$IP129 = array(3274702592);
		$IP229 = array(3274702847);
		$IP130 = array(3557661440);
		$IP230 = array(3557661695);
		$IP131 = array(3583086592);
		$IP231 = array(3583087103);
		$IP132 = array(3563233280);
		$IP232 = array(3563241471);
		$IP133 = array(3651710976);
		$IP233 = array(3651715071);
		//$IP134 = array(01);
	//	$IP234 = array(01);
		$IP135 = array(3228960768);
		$IP235 = array(3228961791);
		$IP136 = array(3245296640);
		$IP236 = array(3245297151);
		$IP139 = array(1426685952);
		$IP234 = array(1426688511);
		$IP140 = array(3245279744);
		$IP240 = array(3245280255);
		$IP141 = array(1411713280);
		$IP241 = array(1411713535);
		$IP142 = array(3652113152);
		$IP242 = array(3652113407);
		$IP143 = array(3458756352);
		$IP243 = array(3458756607);
		$IP144 = array(3561527296);
		$IP244 = array(3561527551);
		$IP145 = array(3283979776);
		$IP245 = array(3283980287);
		
		$IP146 = array(3289116416);
		$IP246 = array(3289118463);
		$IP147 = array(3290185728);
		$IP247 = array(3290202111);
		$IP148 = array(3590112000);
		$IP248 = array(3590112255);
		$IP149 = array(1051015424);
		$IP249 = array(1051015679);
		$IP150 = array(3288793088);
		$IP250 = array(3290923007);
		
		
		
		
		
		
		for ($ix=0; $ix<count($IP101); $ix++)
		{
		if ($ipnum>=$IP101[$ix] && $ipnum<=$IP201[$ix]) {
		$oper = "1";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP102); $ix++)
		{
		if ($ipnum>=$IP102[$ix] && $ipnum<=$IP202[$ix]) {
		$oper = "2";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP103); $ix++)
		{
		if ($ipnum>=$IP103[$ix] && $ipnum<=$IP203[$ix]) {
		$oper = "3";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP104); $ix++)
		{
		if ($ipnum>=$IP104[$ix] && $ipnum<=$IP204[$ix]) {
		$oper = "4";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP105); $ix++)
		{
		if ($ipnum>=$IP105[$ix] && $ipnum<=$IP205[$ix]) {
		$oper = "5";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP106); $ix++)
		{
		if ($ipnum>=$IP106[$ix] && $ipnum<=$IP206[$ix]) {
		$oper = "6";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP107); $ix++)
		{
		if ($ipnum>=$IP107[$ix] && $ipnum<=$IP207[$ix]) {
		$oper = "7";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP108); $ix++)
		{
		if ($ipnum>=$IP108[$ix] && $ipnum<=$IP208[$ix]) {
		$country="1";
		$oper = "8";
		}
		}
		for ($ix=0; $ix<count($IP109); $ix++)
		{
		if ($ipnum>=$IP109[$ix] && $ipnum<=$IP209[$ix]) {
		$oper = "9";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP110); $ix++)
		{
		if ($ipnum>=$IP110[$ix] && $ipnum<=$IP210[$ix]) {
		$oper = "10";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP111); $ix++)
		{
		if ($ipnum>=$IP111[$ix] && $ipnum<=$IP211[$ix]) {
		$oper = "11";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP112); $ix++)
		{
		if ($ipnum>=$IP112[$ix] && $ipnum<=$IP212[$ix]) {
		$oper = "12";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP113); $ix++)
		{
		if ($ipnum>=$IP113[$ix] && $ipnum<=$IP213[$ix]) {
		$oper = "13";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP114); $ix++)
		{
		if ($ipnum>=$IP114[$ix] && $ipnum<=$IP214[$ix]) {
		$oper = "14";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP115); $ix++)
		{
		if ($ipnum>=$IP115[$ix] && $ipnum<=$IP215[$ix]) {
		$oper = "15";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP116); $ix++)
		{
		if ($ipnum>=$IP116[$ix] && $ipnum<=$IP216[$ix])
		{
		$oper = "16";
		$country="1";
		}
		}
		for ($ix=0; $ix<count($IP117); $ix++)
		{
		if ($ipnum>=$IP117[$ix] && $ipnum<=$IP217[$ix]) 
		{
		$oper = "17"; 
		$country="1";
		}
		
		}
		
		// Эстония
		for ($ix=0; $ix<count($IP118); $ix++)
		{
		if ($ipnum>=$IP118[$ix] && $ipnum<=$IP218[$ix]) 
		{
		$oper = "18";
		$country="2";
		}
		}
		for ($ix=0; $ix<count($IP119); $ix++)
		{
		if ($ipnum>=$IP119[$ix] && $ipnum<=$IP219[$ix]) {
		$oper = "19";
		$country="2";
		}
		}

		for ($ix=0; $ix<count($IP120); $ix++)
		{
		if ($ipnum>=$IP120[$ix] && $ipnum<=$IP220[$ix]) {
		$oper = "20";
		$country="2";
		}
		}

         // Литва
		for ($ix=0; $ix<count($IP121); $ix++)
		{
		if ($ipnum>=$IP121[$ix] && $ipnum<=$IP221[$ix]) {
		$oper = "21";
		$country="3";
		}
		}
		for ($ix=0; $ix<count($IP122); $ix++)
		{
		if ($ipnum>=$IP122[$ix] && $ipnum<=$IP222[$ix]) {
		$oper = "22";
		$country="3";
		}
		}
		for ($ix=0; $ix<count($IP123); $ix++)
		{
		if ($ipnum>=$IP123[$ix] && $ipnum<=$IP223[$ix]) 
		{
		$oper = "23";
		$country="3";
		}
		}
		
		
		// Латвия
		for ($ix=0; $ix<count($IP124); $ix++)
		{
		if ($ipnum>=$IP124[$ix] && $ipnum<=$IP224[$ix])
		{
		 $oper = "24";
		 $country="4";
		}
		}
		for ($ix=0; $ix<count($IP125); $ix++)
		{
		if ($ipnum>=$IP125[$ix] && $ipnum<=$IP225[$ix]) {
		$oper = "25";
		$country="4";
		}
		}
       



		for ($ix=0; $ix<count($IP126); $ix++)
		{
		if ($ipnum>=$IP126[$ix] && $ipnum<=$IP226[$ix]) 
		{
		$oper = "31";
		$country="7";
		// umc ua
		}
		}


		if(eregi("193\.41\.[6][0123]\.[0-9]{1,3}", $ip) or $ip=="10.10.10.10")
		{
		$oper = "32";
		$country="7";
		// kievstar ua
		}
		for ($ix=0; $ix<count($IP127); $ix++)
		{
		if ($ipnum>=$IP127[$ix] && $ipnum<=$IP227[$ix]) {
		$oper = "33";
		$country="7";
		// life ua
		}
		}
		for ($ix=0; $ix<count($IP128); $ix++)
		{
		if ($ipnum>=$IP128[$ix] && $ipnum<=$IP228[$ix]) {
		$oper = "34";
		$country="7";
		// beeline ua
		}
		}
		for ($ix=0; $ix<count($IP129); $ix++)
		{
		if ($ipnum>=$IP129[$ix] && $ipnum<=$IP229[$ix])
		{
		$oper = "35";
		$country="5";
		// kcell kz
		}
		}
		
		
		for ($ix=0; $ix<count($IP130); $ix++)
		{
		if ($ipnum>=$IP130[$ix] && $ipnum<=$IP230[$ix]) 
		{
		$oper = "36";
		$country="5";
		// beeline kz
		}
		}
		
		
		for ($ix=0; $ix<count($IP131); $ix++)
		{
		if ($ipnum>=$IP131[$ix] && $ipnum<=$IP231[$ix]) {
		$oper = "37";
		$country="8";
		// kyrgyztelecom kg
		}
		}
		
		
		for ($ix=0; $ix<count($IP132); $ix++)
		{
		if ($ipnum>=$IP132[$ix] && $ipnum<=$IP232[$ix])
		{
		 $oper = "38";
		 $country="9";
		 // best by
		}
		}
		
		
		
		
		for ($ix=0; $ix<count($IP133); $ix++)
		{
		if ($ipnum>=$IP133[$ix] && $ipnum<=$IP233[$ix]) {
		$oper = "39";
		$country="10";
		// azercell az
		}
		}
	/*	
		
		for ($ix=0; $ix<count($IP134); $ix++)
		{
		if ($ipnum>=$IP134[$ix] && $ipnum<=$IP234[$ix]) {
		$oper = "40";
		$country="11";
		// magticom gsm ge
		}
		}
		
		*/
		
		for ($ix=0; $ix<count($IP135); $ix++)
		{
		if ($ipnum>=$IP135[$ix] && $ipnum<=$IP235[$ix]) {
		$oper = "41";
		$country="12";
		}
		}
		for ($ix=0; $ix<count($IP136); $ix++)
		{
		if ($ipnum>=$IP136[$ix] && $ipnum<=$IP236[$ix]) {
		$oper = "42";
		$country="6";
		// indigo tj
		}
		}
		
		
		
		// Снова Казахстан )
		
		// Таджикистан
		for ($ix=0; $ix<count($IP139); $ix++)
		{
		if ($ipnum>=$IP139[$ix] && $ipnum<=$IP239[$ix]) 
		{
		$oper = "44";
		$country="6";
		// beeline tj
		}
		}
		
		for ($ix=0; $ix<count($IP140); $ix++)
		{
		if ($ipnum>=$IP140[$ix] && $ipnum<=$IP240[$ix]) 
		{
		$oper = "45";
		$country="6";
		// babilon tj
		}
		}
		for ($ix=0; $ix<count($IP141); $ix++)
		{
		if ($ipnum>=$IP141[$ix] && $ipnum<=$IP241[$ix]) 
		{
		$oper = "46";
		$country="13";
		// bouyguestelecom fr
		}
		}
		for ($ix=0; $ix<count($IP142); $ix++)
		{
		if ($ipnum>=$IP142[$ix] && $ipnum<=$IP242[$ix]) 
		{
		$oper = "47";
		$country="13";
		// sfr fr
		}
		}
		for ($ix=0; $ix<count($IP143); $ix++)
		{
		if ($ipnum>=$IP143[$ix] && $ipnum<=$IP243[$ix]) 
		{
		$oper = "48";
		$country="12";
		// cellcom il
		}
		}
		
		for ($ix=0; $ix<count($IP144); $ix++)
		{
		if ($ipnum>=$IP144[$ix] && $ipnum<=$IP244[$ix]) 
		{
		$oper = "49";
		$country="11";
		// geocell ge
		}
		}
		
		
		for ($ix=0; $ix<count($IP146); $ix++)
		{
		if ($ipnum>=$IP146[$ix] && $ipnum<=$IP246[$ix]) 
		{
		$oper = "50";
		$country="14";
		// mtn
		}
		}
		
		
			for ($ix=0; $ix<count($IP147); $ix++)
		{
		if ($ipnum>=$IP147[$ix] && $ipnum<=$IP247[$ix]) 
		{
		$oper = "51";
		$country="14";
		// vodacom
		}
		}
		
		
				for ($ix=0; $ix<count($IP148); $ix++)
		{
		if ($ipnum>=$IP148[$ix] && $ipnum<=$IP248[$ix]) 
		{
		$oper = "52";
		$country="1";
		// ekstel
		}
		}
		
		for ($ix=0; $ix<count($IP149); $ix++)
		{
		if ($ipnum>=$IP149[$ix] && $ipnum<=$IP249[$ix]) 
		{
		$oper = "53";
		$country="1";
		// orenburg GSM
		}
		}
		
		for ($ix=0; $ix<count($IP150); $ix++)
		{
		if ($ipnum>=$IP150[$ix] && $ipnum<=$IP250[$ix]) 
		{
		$oper = "54";
		$country="14";
		// CellC
		}
		}
		
		
}		

	
		$names=array();
		// РФ
		$names[1]="Мегафон";
		$names[2]="Билайн";	
		$names[3]="Utel";	
		$names[4]="БайкалВестКом";	
		$names[5]="МТС";	
		$names[6]="TELE2";	
		$names[7]="МОТИВ";	
		$names[8]="Енисейтелеком";	
		$names[9]="НСС";	
		$names[10]="СМАРТ";	
		$names[11]="СТЕК GSM";	
		$names[12]="Татинком-Т";	
		$names[13]="Ульяновск GSM";	
		$names[14]="НТК";	
		$names[15]="SkyLink";	
		$names[16]="Цифровая экспансия";	
		$names[17]="ИНДИГО";	
		// Эстония
		$names[18]="Emt";	
		$names[19]="Elisa";	
		$names[20]="Tele-2";
		// Литва	
		$names[21]="Bite";	
		$names[22]="Omnitel";	
		$names[23]="Tele-2";
		// Латвия
		$names[24]="Tele-2";	
		$names[25]="Lmt";
		// Казахстан
		$names[36]="Билайн";
		$names[35]="K-cell";
		// Таджикистан
		$names[44]="Билайн"; // Билайн велик :)
		$names[45]="Babilon GSM";
		$names[42]="Индиго";
		// Украина
		$names[31]="UMC";	
		$names[32]="КиевСтар";	
		$names[33]="life :)";
		$names[34]="Билайн";
		// Киргизия
		$names[37]="Кыргызтелеком";
		// Белоруссия
		$names[38]="БеСТ";
		// Азербайджан
		$names[39]="Azercell";
		// Грузия
		$names[40]="Magti GSM";
		$names[49]="Geocell";
		// Израиль
		$names[41]="Orange";
		$names[48]="Cellcom";
		// Франция
		$names[46]="Bouygues Telecom";
		$names[47]="SFR";
		
		
		$names[50]="mtn";
		$names[51]="vodacom";
		$names[52]="Экстел GSM";
		$names[53]="Оренбург-GSM";
		$names[54]="CellC";
		
		$countries=array();
		$countries[1]="Россия";
		$countries[2]="Эстония";
		$countries[3]="Литва";
		$countries[4]="Латвия";
		$countries[5]="Казахстан";	
	    $countries[6]="Таджикистан";
	    $countries[7]="Украина";	
	    $countries[8]="Киргизия";
	    $countries[9]="Белоруссия";
	    $countries[10]="Азербайджан";
	    $countries[11]="Грузия";
	    $countries[12]="Израиль";
	    $countries[13]="Франция";
	    $countries[14]="Юар";




?>