Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $bin = $_GET['bin'];
- if(!$bin){
- echo '
- <form method="get" action="">
- <input type="text" name="bin" maxlength="6">
- <input type="submit" name="submit" value="check">
- </form>
- ';
- }else{
- $json_url = "https://lookup.binlist.net/".$bin;
- $c = curl_init();
- curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
- curl_setopt($c, CURLOPT_URL, $json_url);
- $str = curl_exec($c);
- $ar = json_decode($str,true);
- $type = $ar['scheme'];
- $tipe = $ar['type'];
- $negara = $ar['country']['name'];
- $bank = $ar['bank']['name'];
- echo "
- [ $bin ] [ $type/$tipe ] $bank - $negara
- ";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement