Advertisement
bug7sec

Proxy Checker

Jan 7th, 2016
2,910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.61 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Checker Proxy Online</title>
  5.     <style type="text/css">
  6.     body{
  7.         background-color: #333333;
  8.         color: #99CC00;
  9.         }
  10.     body,td,th {
  11.             color: #99CC00;
  12.         }
  13.     h2
  14.         {
  15.             color: #1fa67a;
  16.             text-align: center;
  17.         }
  18.             h4
  19.         {
  20.             color: #1b926c;
  21.             text-align: center;
  22.         }
  23.     .atas{font-family: 'Nova Flat';
  24.         color: red;
  25.     }
  26.     .navmen{
  27.             text-align: center;
  28.     padding-top: 5px;
  29.     padding-bottom: 20px;
  30.     }
  31.  
  32.     /* latin */
  33. @font-face {
  34.   font-family: 'Nova Flat';
  35.   font-style: normal;
  36.   font-weight: 400;
  37.   src: local('Nova Flat'), local('NovaFlat'), url(http://fonts.gstatic.com/s/novaflat/v8/vFeor41nvsomiEVSx6n4iltXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
  38.   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
  39. }
  40.  
  41. textarea {
  42.     font-family: monospace;
  43.     background-color: #333333;
  44.     border-color: #1b926c;
  45.     color: #1b926c;
  46. }
  47. dl{
  48.     font-family: 'Nova Flat';
  49.     font-size: 14px;
  50.     padding: 0px;
  51.     margin: -7px;
  52.     color: #FF0000;
  53. }
  54. .result{
  55.     font-family: 'Nova Flat';
  56.     font-size: 14px;
  57.     padding: 0px;
  58.     margin: 0px;
  59.     text-align: center;
  60.     border: 1px solid #293336;
  61.     border-style: dashed;
  62.     border-width: 1px;
  63.     border-left: 4px solid #73AD21;
  64.     padding-top: 10px;
  65. }
  66. a:-webkit-any-link {
  67.     color: #1b926c;
  68.     text-decoration: blink;
  69.     cursor: help;
  70. }
  71. </style>
  72. <script type="text/javascript" src="//code.jquery.com/jquery-1.8.3.js"></script>
  73. <script type="text/javascript">
  74. function countFakes()
  75. {
  76. document.getElementById("count").innerHTML =
  77. document.getElementById("list_proxy").value.split("\n").length;
  78. }
  79. </script>
  80. </head>
  81. <body>
  82.  
  83. <div class="atas">
  84. <h2><a href="?">Checker Proxy Online </a></h2>
  85. <h4>All protocols support | Shor7cut</h4>
  86. </div>
  87.  
  88.  
  89. <form name="checkproxy" method="post">
  90. <center><textarea name="list_proxy" id="list_proxy" onKeyDown="countFakes()" onChange="countFakes()" style="margin: 0px; width: 932px; height: 218px;"></textarea></center>
  91. <div class="navmen">
  92. <input type="checkbox" checked="checked" name="live" disabled=""><label>Live Only</label>&nbsp;
  93. <input type="checkbox" checked="checked" name="" disabled=""><label>Proxy</label>&nbsp;
  94. <input type="checkbox" checked="checked" name="" disabled=""><label>Protocols</label>&nbsp;
  95. <input type="checkbox" checked="checked" name="time"><label>Times</label>&nbsp;
  96. <input type="checkbox" checked="checked" name="city"><label>City</label>&nbsp;
  97. <input type="checkbox" checked="checked" name="country"><label>Country</label>&nbsp;
  98. <input type="checkbox" checked="checked" name="ccode"><label>Country Code</label>&nbsp;
  99. <input type="checkbox" checked="checked" name="isp"><label>isp</label>&nbsp;
  100. <input type="checkbox" checked="checked" name="rigional"><label>Region name</label>&nbsp;
  101. <select name="timeout">
  102.     <option name="1">1 Sec</option>
  103.     <option name="2">2 Sec</option>
  104.     <option name="3">3 Sec</option>
  105.     <option name="4">4 Sec</option>
  106.     <option name="5">5 Sec</option>
  107. </select> <label>Lost Time</label>&nbsp;
  108. <input type="submit" name="cekproxy" value=" Checker " name="btn-submit"><br>
  109. </div>
  110. </form>
  111. <div class="navmen">
  112. <label>Proxy List : </label> <font id="count" style="font-weight: bold;">0</font>
  113. <div class="result">
  114. <?php
  115. error_reporting(0);
  116. set_time_limit(0);
  117. /*
  118. Name   : Proxy Checker
  119. Author : Shor7cut
  120. Credits : BUG7SEC
  121. Link : http://facebook.com/bug7sec
  122. */
  123. if($_POST['cekproxy']){
  124. echo "<hr><br>";
  125. $proxy_type = array(
  126.   'CURLPROXY_HTTP',
  127.   'CURLPROXY_SOCKS4',
  128.   'CURLPROXY_SOCKS5',
  129.   'CURLPROXY_SOCKS4A',
  130.   'CURLPROXY_SOCKS5_HOSTNAME',
  131.   );
  132.  
  133. $list_proxy         = $_POST['list_proxy'];
  134. $config_time        = $_POST['time'];
  135. //$config_time      = "1";
  136. $config_city        = $_POST['city'];
  137. $config_country     = $_POST['country'];
  138. $config_ccode       = $_POST['ccode'];
  139. $config_isp         = $_POST['isp'];
  140. $config_rigional    = $_POST['rigional'];
  141. $config_timeout     = $_POST['timeout'];
  142.  
  143. switch ($config_timeout) {
  144.     case '1':
  145.     $config_timeout     = "1";
  146.     break;
  147.     case '2':
  148.     $config_timeout     = "2";
  149.     break;
  150.     case '3':
  151.     $config_timeout     = "3";
  152.     break;
  153.     case '4':
  154.     $config_timeout     = "4";
  155.     break;
  156.     case '5':
  157.     $config_timeout     = "5";
  158.     break;
  159.    
  160.     default:
  161.     $config_timeout     = "1";
  162.     break;
  163. }
  164.  
  165.  
  166. function cekdata($string){
  167.     if(!empty($string)){
  168.         return $data = "$string";
  169.     }else{
  170.         return $data = "-";
  171.     }
  172. }
  173.  
  174. if(!empty($_POST['list_proxy'])){
  175. $explode = explode("\r\n", $list_proxy);
  176. $success=0;
  177. $fail=0;
  178. $jumlah_proxy = count($explode);
  179. foreach ($explode as $key => $proxy) {
  180. foreach ($proxy_type as $key => $type) {
  181.  
  182. $cURL = curl_init();
  183. curl_setopt($cURL, CURLOPT_URL, "http://ip-api.com/json");
  184. curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
  185. curl_setopt($cURL, CURLOPT_CONNECTTIMEOUT ,0);
  186. curl_setopt($cURL, CURLOPT_TIMEOUT, $config_timeout); //timeout in second
  187. curl_setopt($cURL, CURLOPT_PROXYTYPE, $type);
  188. curl_setopt($cURL, CURLOPT_PROXY, $proxy);
  189. $data = curl_exec($cURL);
  190. $data = json_decode($data,true);
  191. $info = curl_getinfo($cURL);
  192. $error = curl_error($cURL);
  193.  
  194.  
  195. if($data){
  196.  
  197. switch ($type) {
  198.     case 'CURLPROXY_HTTP':
  199.         $type = "HTTP/s";
  200.     break;
  201.     case 'CURLPROXY_SOCKS4':
  202.         $type = "SOCKS4";
  203.     break;
  204.     case 'CURLPROXY_SOCKS5':
  205.         $type = "SOCKS5";
  206.     break;
  207.     case 'CURLPROXY_SOCKS4A':
  208.         $type = "SOCKS4A";
  209.     break;
  210.     case 'CURLPROXY_SOCKS5_HOSTNAME':
  211.         $type = "SOCKS5 HOSTNAME";
  212.     break;
  213.    
  214.     default:
  215.         $type = "Gak Tau -_-";
  216.     break;
  217. }
  218.  
  219.  
  220.  
  221. echo "<dl>";
  222. echo "<font color=yellow>LIVE</font> | <font color=#16FF3F>$proxy</font> | <font color=#FF5722>$type</font> | ";
  223. if($config_time){
  224. echo "<font color=#00ff00>".$info['total_time']."</font> | ";
  225. }
  226. if($config_city){
  227. echo "<font color=orange>".$data['city']."</font> | ";
  228. }
  229. if($config_country){
  230. echo "<font color=#00ffff>".$data['country']."</font> | ";
  231. }
  232. if($config_ccode){
  233. echo "<font color=#ff00ff>".$data['countryCode']."</font> | ";
  234. }
  235. if($config_isp){
  236. echo "<font color=#0DDA32>".$data['isp']."</font> | ";
  237. }
  238. if($config_rigional){
  239. echo "<font color=#DAAF0D>".$data['regionName']."</font>";
  240. }
  241. echo "</dl><br>";
  242. $success++;
  243. }
  244. $fail++;
  245.  
  246.     flush();
  247.     ob_flush();
  248.    
  249.     }
  250.     flush();
  251.     ob_flush();
  252.     }
  253. }
  254. //$is = $fail-$jumlah_proxy;
  255. echo "<hr><br>-{ Live : <font color=#98F325>$success</font> | DIE : <font color=red>".$fail."</font> }-";
  256. }
  257. ?>
  258.  
  259. </div>
  260. </div>
  261.  
  262.  
  263.  
  264. <!--
  265. <div class="navmen">
  266. <div class="result">
  267. <font color="yellow">LIVE </font> | <font color="#16FF3F">Sent Success</font><br>
  268. <dl><font color="yellow">LIVE </font> | <font color="#16FF3F">Sent Success</font></dl><br>
  269. </div>
  270. </div>
  271. -->
  272.  
  273. </body>
  274. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement