Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Bin Checker [binov.net]
- * @author Achmad Fahri <[email protected]>
- */
- class Bin {
- public function Check($bin) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://binov.net/");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "BIN=".$bin."&COUNTRY=1&BANK=1");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
- $headers = array();
- $headers[] = "Host: binov.net";
- $headers[] = "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0";
- $headers[] = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
- $headers[] = "Accept-Language: en-US,en;q=0.5";
- $headers[] = "Content-Type: application/x-www-form-urlencoded";
- $headers[] = "Referer: https://binov.net/";
- $headers[] = "Connection: keep-alive";
- $headers[] = "Upgrade-Insecure-Requests: 1";
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- if (curl_errno($ch)) {
- echo curl_error($ch);
- } else {
- $hasil = $this->GetStr($result, '<tr><td>'.$bin.'</td><td>', '</td></tr></table>');
- $hasil = str_replace("</td><td>", " ", $hasil);
- echo $hasil."\r\n";
- }
- }
- public function GetStr($string, $start, $end) {
- $str = explode($start, $string);
- $str = explode($end, $str[1]);
- return $str[0];
- }
- }
- $api = new Bin();
- $api->Check("440066");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement