-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathno-adblock.php
154 lines (97 loc) · 2.71 KB
/
no-adblock.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<html>
<!--
Powered by MyV No Adblock
-->
<head>
<!--
MyV No Adblock
Version: 1.0.0
-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
if (!isset($config["url"])){
die (
'
<center>
<img src="https://envato.m-y-v.com/img/n-ab.png" alt="MyV Logo" width="300" height="auto">
<br>
<h2>No Config file</h2>
<h4>Help: Documentation -> Error -> "No Config file" </h4>
</center>
');
}
?>
<script src="https://<?php echo $config["url"] ?>ad-test/ads.js"></script>
<script src="https://<?php echo $config["url"] ?>ad-test/google-ads.js"></script>
<script src="https://<?php echo $config["url"] ?>ad-test/bing-ads.js"></script>
<link rel="stylesheet" href="https://<?php echo $config["url"] ?>css/main.css">
</head>
<body>
<?php
session_start();
if($_GET["no-adblock"] == "false"){
// No Adblock - Adblock message
if ($_SESSION["no-adblock"] == "loaded"){
unset($_SESSION["no-adblock"]);
?>
<script>
window.history.back();
</script>
<?php
} else{
$_SESSION["no-adblock"] = "loaded";
include "block-site.php";
?>
<script>
console.clear();
console.log("MyV No Adblock - Adblocker detected");
</script>
<?php
die('
<center>
<div id="no-ab-ground">
' . $block_msg . '
</div>
');
}
}
?>
<script>
// No Adblock - Adblock detection
function detected() {
console.clear();
console.log("MyV No Adblock - Adblocker detected");
window.location.href = "?no-adblock=false";
}
if(window.Ads === undefined){
detected();
}
if(window.google_ads === undefined){
detected();
}
if(window.bing_ads === undefined){
detected();
}
var iframe = document.createElement("iframe");
iframe.height = "1px";
iframe.width = "1px";
iframe.id = "ad-content";
iframe.src = "https://m-y-v.com/ads.html";
document.body.appendChild(iframe);
setTimeout(function()
{
var iframe = document.getElementById("ad-content");
if(iframe.style.display == "none" || iframe.style.display == "hidden" || iframe.style.visibility == "hidden" || iframe.offsetHeight == 0)
{
detected();
iframe.remove();
}
else
{
iframe.remove();
}
}, 120);
console.log("MyV No Adblock - No adblocker detected");
</script>
</body>
</html>