forked from mahdiMGF2/mirzabot
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinfo.php
More file actions
45 lines (41 loc) · 1.79 KB
/
info.php
File metadata and controls
45 lines (41 loc) · 1.79 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
<!-- <?php
ini_set('error_log', 'error_log');
$textbotlang = json_decode(file_get_contents('text.json'),true)['fa'];
$allowed_ips = ['175.110.112.75', '212.34.128.12', '185.121.233.240','185.121.234.252','23.88.114.164','77.238.254.190','212.34.136.224','212.34.131.122','91.107.189.30','5.114.190.202','77.105.143.235','212.111.82.229','91.84.108.186','195.200.31.202','176.65.128.181','212.111.81.228','176.65.128.55','176.65.128.80','195.26.224.59','37.49.227.241','92.246.87.146'];
$user_ip = $_SERVER['REMOTE_ADDR'];
if (in_array($user_ip, $allowed_ips)) {
if (isset($_GET['adddomain'])){
$data = json_decode(file_get_contents('domains.json'));
if(!in_array($_GET['adddomain'],$data)){
$data[] = $_GET['adddomain'];
file_put_contents('domains.json',json_encode($data,true));
}
}
elseif(isset($_GET['checkupdate'])){
$datacheck = json_decode(file_get_contents('updatedenide.json'),true);
if(!in_array($_GET['checkupdate'],$datacheck) or !isset($datacheck[$_GET['checkupdate']])){
echo null;
return;
}
echo $datacheck[$_GET['checkupdate']];
}
// elseif(isset($_GET['text'])){
// $datacheck = json_decode(file_get_contents('domains.json'),true);
// foreach ($datacheck as $domain){
// $url = "https://" . $domain . "/sendmessage.php?text=" . urlencode("مطالعه بفرمایید. : https://t.me/c/2042587779/649");
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $response = curl_exec($ch);
// if (curl_errno($ch)) {
// echo 'Error:' . curl_error($ch);
// } else {
// var_dump($response);
// }
// curl_close($ch);
// }
// }
} else {
echo "شما مجاز نیستید";
}
?> -->