Просмотр файла zagrcent/func2.php

Размер файла: 9.26Kb
  1. <?php function oper($ip){
  2. $ips = split("\.", "$ip");
  3. @$ipnum = $ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256;
  4. $oper = 0;
  5. $IP101 = array(2130706433,1402273792,1402277888,1402279936,1402281984,1402284032,1402286080,1402287104,3251233792,3582031776);
  6. $IP201 = array(2130706687,1402275839,1402278911,1402280959,1402283007,1402285055,1402287103,1402288127,3251234815,3582031807);
  7. $IP102 = array(1433657344,3648405504,3648406528,3648408576,3648409600,3648410624,3648411648,3648412672);
  8. $IP202 = array(1433657599,3648406527,3648407551,3648409599,3648410623,3648411647,3648412671,3648413695);
  9. $IP103 = array(1494508029,1047070464,1401450496,1401451520,1406861312,1425989632,1441366016,3272364544,3564675072,3564676832,3571187712,3641816064,3641816576);
  10. $IP203 = array(1494508029,1047072255,1401450751,1401451775,1406869503,1425994239,1441371903,3272364799,3564683263,3564676863,3571253247,3641816319,3641816831);
  11. $IP104 = array(1347599104,3588519936);
  12. $IP204 = array(1347599359,3588520447);
  13. $IP105 = array(1042394624,1346950400,1347674112,1360933376,1372794624,1410457600,3258356736,3277188608,3281465344,3287259392,3559689216,3562834880,3578831872,3579259392,3579267072,3579269120,3641237504,3641237504,3645018112,3645566976,3648478720);
  14. $IP205 = array(1042394879,1346950655,1347678207,1360933887,1372794879,1410459647,3258357759,3277188863,3281465599,3287259647,3559689471,3562834943,3578832127,3579265535,3579267935,3579273215,3641241599,3641240575,3645019135,3645569023,3648479231);
  15. $IP106 = array(1404043264,2197028864);
  16. $IP206 = array(1405091839,2197094399);
  17. $IP107 = array(3650368512);
  18. $IP207 = array(3650368767);
  19. $IP108 = array(3278955480,3278956288,3278960128);
  20. $IP208 = array(3278955515,3278956543,3278960383);
  21. $IP109 = array(1389383040,1432330240,3282161664,3282171904,3585171456);
  22. $IP209 = array(1389383167,1432334335,3282163711,3282173951,3585174271);
  23. $IP110 = array(1346736128,3260286336,3645731072);
  24. $IP210 = array(1346737151,3260286463,3645731079);
  25. $IP111 = array(3648294912);
  26. $IP211 = array(3648295935);
  27. $IP112 = array(1481787392,3652001536);
  28. $IP212 = array(1481787647,3652001599);
  29. $IP113 = array(1052193280,1347125248,1347125248,1347126528);
  30. $IP213 = array(1052193535,1347129343,1347125759,1347127167);
  31. $IP114 = array(1358118912,1358119680);
  32. $IP214 = array(1358119423,1358123007);
  33. $IP115 = array(1406740480,1406741504,3564593152,3564595968,3564599808,3565248512,3565250048,3565250560,3578853376,3648215680);
  34. $IP215 = array(1406741503,1406743551,3564593407,3564596735,3564601343,3565256703,3565250559,3565254655,3578854079,3648215807);
  35. $IP116 = array(3651751936,3651752192,3651755008);
  36. $IP216 = array(3651752191,3651752447,3651756031);
  37. $IP117 = array(3287244288);
  38. $IP217 = array(3287244543);
  39. $IP118 = array(3645317120);
  40. $IP218 = array(3645318015);
  41. $IP119 = array(3268669440);
  42. $IP219 = array(3268673535);
  43. $IP120 = array(2197028864);
  44. $IP220 = array(2197094399);
  45. $IP121 = array(3588390912,1410269184);
  46. $IP221 = array(3588391935,1410334719);
  47. $IP122 = array(3266322432);
  48. $IP222 = array(3266322687);
  49. $IP123 = array(2197028864);
  50. $IP223 = array(2197094399);
  51. $IP124 = array(2197028864);
  52. $IP224 = array(2197094399);
  53. $IP125 = array(3562882304);
  54. $IP225 = array(3563086079);
  55. $IP300 = array(3240705024);
  56. $IP301 = array(3240706047);
  57. $IP302 = array(1358905344,1358905344,1358907392,1358907648,1358907904,1358908160,1358908416,1358908672,1358908928,1358909184,1490436096);
  58. $IP303 = array(1358909439,1358905471,1358907647,1358907903,1358908159,1358908415,1358908671,1358908927,1358909183,1358909439,1490444287);
  59. $IP304 = array(3560612352,3560612864);
  60. $IP305 = array(3560612863,3560613887);
  61. $IP306 = array(3253698560);
  62. $IP307 = array(3253699071);
  63. $IP308 = array(3274702592);
  64. $IP309 = array(3274702847);
  65. $IP310= array(3557661440,3563233536,3583086592);
  66. $IP311 = array(3557661695,3563233791,3583087103);
  67.  
  68. $IP312= array(1410273024,3588391680,2197079040,3588406784,3588407040);
  69. $IP313 = array(1410273279,3588391935,2197079295,3588407039,3588407295);
  70.  
  71. for ($ix=0; $ix<count($IP101); $ix++)
  72. {
  73. if ($ipnum>=$IP101[$ix] && $ipnum<=$IP201[$ix]) $oper = "1";
  74. }
  75. for ($ix=0; $ix<count($IP102); $ix++)
  76. {
  77. if ($ipnum>=$IP102[$ix] && $ipnum<=$IP202[$ix]) $oper = "2";
  78. }
  79. for ($ix=0; $ix<count($IP103); $ix++)
  80. {
  81. if ($ipnum>=$IP103[$ix] && $ipnum<=$IP203[$ix]) $oper = "3";
  82. }
  83. for ($ix=0; $ix<count($IP104); $ix++)
  84. {
  85. if ($ipnum>=$IP104[$ix] && $ipnum<=$IP204[$ix]) $oper = "4";
  86. }
  87. for ($ix=0; $ix<count($IP105); $ix++)
  88. {
  89. if ($ipnum>=$IP105[$ix] && $ipnum<=$IP205[$ix]) $oper = "5";
  90. }
  91. for ($ix=0; $ix<count($IP106); $ix++)
  92. {
  93. if ($ipnum>=$IP106[$ix] && $ipnum<=$IP206[$ix]) $oper = "6";
  94. }
  95. for ($ix=0; $ix<count($IP107); $ix++)
  96. {
  97. if ($ipnum>=$IP107[$ix] && $ipnum<=$IP207[$ix]) $oper = "7";
  98. }
  99. for ($ix=0; $ix<count($IP108); $ix++)
  100. {
  101. if ($ipnum>=$IP108[$ix] && $ipnum<=$IP208[$ix]) $oper = "8";
  102. }
  103. for ($ix=0; $ix<count($IP109); $ix++)
  104. {
  105. if ($ipnum>=$IP109[$ix] && $ipnum<=$IP209[$ix]) $oper = "9";
  106. }
  107. for ($ix=0; $ix<count($IP110); $ix++)
  108. {
  109. if ($ipnum>=$IP110[$ix] && $ipnum<=$IP210[$ix]) $oper = "10";
  110. }
  111. for ($ix=0; $ix<count($IP111); $ix++)
  112. {
  113. if ($ipnum>=$IP111[$ix] && $ipnum<=$IP211[$ix]) $oper = "11";
  114. }
  115. for ($ix=0; $ix<count($IP112); $ix++)
  116. {
  117. if ($ipnum>=$IP112[$ix] && $ipnum<=$IP212[$ix]) $oper = "12";
  118. }
  119. for ($ix=0; $ix<count($IP113); $ix++)
  120. {
  121. if ($ipnum>=$IP113[$ix] && $ipnum<=$IP213[$ix]) $oper = "13";
  122. }
  123. for ($ix=0; $ix<count($IP114); $ix++)
  124. {
  125. if ($ipnum>=$IP114[$ix] && $ipnum<=$IP214[$ix]) $oper = "14";
  126. }
  127. for ($ix=0; $ix<count($IP115); $ix++)
  128. {
  129. if ($ipnum>=$IP115[$ix] && $ipnum<=$IP215[$ix]) $oper = "15";
  130. }
  131. for ($ix=0; $ix<count($IP116); $ix++)
  132. {
  133. if ($ipnum>=$IP116[$ix] && $ipnum<=$IP216[$ix]) $oper = "16";
  134. }
  135. for ($ix=0; $ix<count($IP117); $ix++)
  136. {
  137. if ($ipnum>=$IP117[$ix] && $ipnum<=$IP217[$ix]) $oper = "17";
  138. }
  139. for ($ix=0; $ix<count($IP118); $ix++)
  140. {
  141. if ($ipnum>=$IP118[$ix] && $ipnum<=$IP218[$ix]) $oper = "18";
  142. }
  143. for ($ix=0; $ix<count($IP119); $ix++)
  144. {
  145. if ($ipnum>=$IP119[$ix] && $ipnum<=$IP219[$ix]) $oper = "19";
  146. }
  147. for ($ix=0; $ix<count($IP120); $ix++)
  148. {
  149. if ($ipnum>=$IP120[$ix] && $ipnum<=$IP220[$ix]) $oper = "20";
  150. }
  151. for ($ix=0; $ix<count($IP121); $ix++)
  152. {
  153. if ($ipnum>=$IP121[$ix] && $ipnum<=$IP221[$ix]) $oper = "21";
  154. }
  155. for ($ix=0; $ix<count($IP122); $ix++)
  156. {
  157. if ($ipnum>=$IP122[$ix] && $ipnum<=$IP222[$ix]) $oper = "22";
  158. }
  159. for ($ix=0; $ix<count($IP123); $ix++)
  160. {
  161. if ($ipnum>=$IP123[$ix] && $ipnum<=$IP223[$ix]) $oper = "23";
  162. }
  163. for ($ix=0; $ix<count($IP124); $ix++)
  164. {
  165. if ($ipnum>=$IP124[$ix] && $ipnum<=$IP224[$ix]) $oper = "24";
  166. }
  167. for ($ix=0; $ix<count($IP125); $ix++)
  168. {
  169. if ($ipnum>=$IP125[$ix] && $ipnum<=$IP225[$ix]) $oper = "25";
  170. }
  171. for ($ix=0; $ix<count($IP300); $ix++)
  172. {
  173. if ($ipnum>=$IP300[$ix] && $ipnum<=$IP301[$ix]) $oper = "26";
  174. }
  175. for ($ix=0; $ix<count($IP302); $ix++)
  176. {
  177. if ($ipnum>=$IP302[$ix] && $ipnum<=$IP303[$ix]) $oper = "27";
  178. }
  179. for ($ix=0; $ix<count($IP304); $ix++)
  180. {
  181. if ($ipnum>=$IP304[$ix] && $ipnum<=$IP305[$ix]) $oper = "28";
  182. }
  183. for ($ix=0; $ix<count($IP306); $ix++)
  184. {
  185. if ($ipnum>=$IP306[$ix] && $ipnum<=$IP307[$ix]) $oper = "29";
  186. }
  187. for ($ix=0; $ix<count($IP308); $ix++)
  188. {
  189. if ($ipnum>=$IP308[$ix] && $ipnum<=$IP309[$ix]) $oper = "30";
  190. }
  191. for ($ix=0; $ix<count($IP310); $ix++)
  192. {
  193. if ($ipnum>=$IP310[$ix] && $ipnum<=$IP311[$ix]) $oper = "30";
  194. }
  195. for ($ix=0; $ix<count($IP312); $ix++)
  196. {
  197. if ($ipnum>=$IP312[$ix] && $ipnum<=$IP313[$ix]) $oper = "31";
  198. }
  199.  
  200. return $oper;}
  201. ///////////////////////////////////
  202. function oper_name($oper)
  203. {
  204. if($oper == 0)$oper_name = "Не определен";
  205. if($oper == 1)$oper_name = "Мегафон";
  206. if($oper == 2)$oper_name = "Билайн";
  207. if($oper == 3)$oper_name = "Utel";
  208. if($oper == 4)$oper_name = "БайкалВестКом";
  209. if($oper == 5)$oper_name = "МТС";
  210. if($oper == 6)$oper_name = "TELE2";
  211. if($oper == 7)$oper_name = "МОТИВ";
  212. if($oper == 8)$oper_name = "Енисейтелеком";
  213. if($oper == 9)$oper_name = "НСС";
  214. if($oper == 10)$oper_name = "СМАРТС";
  215. if($oper == 11)$oper_name = "СТЕК GSM";
  216. if($oper == 12)$oper_name = "Татинком-Т";
  217. if($oper == 13)$oper_name = "Ульяновск GSM";
  218. if($oper == 14)$oper_name = "НТК";
  219. if($oper == 15)$oper_name = "СКАЙЛИНК";
  220. if($oper == 16)$oper_name = "Цифровая экспансия";
  221. if($oper == 17)$oper_name = "ИНДИГО";
  222. if($oper == 18)$oper_name = "Emt (Эстония)";
  223. if($oper == 19)$oper_name = "Elisa (Эстония)";
  224. if($oper == 20)$oper_name = "Tele-2 (Эстония)";
  225. if($oper == 21)$oper_name = "Bite (Литва)";
  226. if($oper == 22)$oper_name = "Omnitel (Литва)";
  227. if($oper == 23)$oper_name = "Tele-2 (Литва)";
  228. if($oper == 24)$oper_name = "Tele-2 (Латвия)";
  229. if($oper == 25)$oper_name = "Lmt (Латвия)";
  230. if($oper == 26)$oper_name = "Киевстар";
  231. if($oper == 27)$oper_name = "UMC";
  232. if($oper == 28)$oper_name = "life:)";
  233. if($oper == 29)$oper_name = "WellCOM (Билайн)";
  234. if($oper == 30)$oper_name = "KCELL";
  235. if($oper == 31)$oper_name = "Прибалтийские операторы";
  236.  
  237. return $oper_name;}
  238. ?>