This repository was archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfinddol.php
More file actions
74 lines (60 loc) · 1.67 KB
/
finddol.php
File metadata and controls
74 lines (60 loc) · 1.67 KB
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
<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
$myfile = fopen("cache/test.txt","r") or die("Unable to open file!");
$json_string = fread($myfile,filesize("cache/test.txt"));
fclose($myfile);
$json_array = json_decode($json_string);
$count = 0;
$allwin = array();
$mh = curl_multi_init();
$channels = [];
foreach($json_array as $id){
if($count <= 408){
$count += 1;
continue;
}
/*$selnum = rand(1,10);
if($selnum > 7){
$fetchURL = "https://quadbproject.000webhostapp.com/forfind/?date=".$id."&from";
}else{*/
$fetchURL = "https://lottsanook.herokuapp.com/?date=".$id."&from";
//}
$channels[$id] = curl_init($fetchURL);
curl_setopt($channels[$id], CURLOPT_RETURNTRANSFER, true);
curl_setopt($channels[$id], CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($channels[$id], CURLOPT_SSL_VERIFYPEER, false);
curl_multi_add_handle($mh, $channels[$id]);
}
$count = 0;
$running = null;
do {
curl_multi_exec($mh, $running);
curl_multi_select($mh);
} while ($running > 0);
foreach ($json_array as $id) {
if($count <= 408){
$count += 1;
continue;
}else{
curl_multi_remove_handle($mh, $channels[$id]);
}
}
curl_multi_close($mh);
$count = 0;
foreach($json_array as $id){
if($count <= 408){
$count += 1;
continue;
}
$res = curl_multi_getcontent($channels[$id]);
$number_array = json_decode($res);
foreach($number_array as $vall){
if (in_array(strval($_GET['search']), $vall, true))
{
array_push($allwin,$number_array[0][0]);
}
}
}
echo json_encode($allwin);
?>