Advertisement
AlexaMP

Simple CreditCard Bin Detector

Mar 31st, 2018
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3.  
  4. $bin = $_GET['bin'];
  5.  
  6. if(!$bin){
  7. echo '
  8. <form method="get" action="">
  9. <input type="text" name="bin" maxlength="6">
  10. <input type="submit" name="submit" value="check">
  11. </form>
  12. ';
  13. }else{
  14. $json_url = "https://lookup.binlist.net/".$bin;
  15. $c = curl_init();
  16. curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  17. curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
  18. curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
  19. curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  20. curl_setopt($c, CURLOPT_URL, $json_url);
  21.  
  22.  $str = curl_exec($c);
  23.  
  24.  $ar = json_decode($str,true);
  25.  
  26. $type = $ar['scheme'];
  27. $tipe = $ar['type'];
  28. $negara = $ar['country']['name'];
  29. $bank = $ar['bank']['name'];
  30.  
  31. echo "
  32. [ $bin ] [ $type/$tipe ] $bank - $negara
  33. ";
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement