-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
183 lines (166 loc) · 7.38 KB
/
index.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php
try {
//USD
$USDjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=1&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$USDobj = json_decode($USDjson);
$USD = preg_replace("/[^0-9\.]/", '', $USDobj->lowest_price);
/*
// Argentina
$ARGjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=1&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$ARGobj = json_decode($ARGjson);
$ARG = preg_replace("/[^0-9\.]/", '', $ARGobj->lowest_price);
// TR
$TRjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=1&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$TRobj = json_decode($TRjson);
$TR = preg_replace("/[^0-9\.]/", '', $TRobj->lowest_price);
*/
// UA
$UAjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=18&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$UAobj = json_decode($UAjson);
$UA = preg_replace("/[^0-9\.]/", '', $UAobj->lowest_price)/100;
// RU
$RUjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=5&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$RUobj = json_decode($RUjson);
$RU = preg_replace("/[^0-9\.]/", '', $RUobj->lowest_price)/100;
// IN
$INjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=24&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$INobj = json_decode($INjson);
$IN = preg_replace("/[^0-9\.]/", '', $INobj->lowest_price);
// BR
$BRjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=7&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$BRobj = json_decode($BRjson);
$BR = preg_replace("/[^0-9\.]/", '', $BRobj->lowest_price)/100;
// KZ
$KZjson = file_get_contents('https://steamcommunity.com/market/priceoverview/?appid=440¤cy=37&market_hash_name=Mann%20Co.%20Supply%20Crate%20Key');
$KZobj = json_decode($KZjson);
$KZ = preg_replace("/[^0-9\.]/", '', $KZobj->lowest_price)/100;
} catch (Exception $e) {
echo "<script type='text/javascript'>alert('$e->getMessage()');</script>";
}
?>
<!DOCTYPE html>
<html >
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="module" defer="">
import { polyfillCountryFlagEmojis } from "https://cdn.skypack.dev/country-flag-emoji-polyfill";
polyfillCountryFlagEmojis();
</script>
<meta charset="UTF-8">
<title>SteamPulse</title>
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/png" href="favicon.png"/>
</head>
<script>
var countDownDate = new Date().getTime();
var x = setInterval(function() {
var now = new Date().getTime();
var distance = now - countDownDate;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
var outputstrings ="";
if(days >=1)
{
outputstrings = "آخرین آپدیت: "+days + " روز و " + hours + " ساعت و "+ minutes + " دقیقه و " + seconds + " ثانیه قبل";
}
else if(hours >=1)
{
outputstrings = "آخرین آپدیت: "+ hours + " ساعت و "+ minutes + " دقیقه و " + seconds + " ثانیه قبل";
}
else if(minutes >=1)
{
outputstrings = "آخرین آپدیت: "+ minutes + " دقیقه و " + seconds + " ثانیه قبل";
}
else
{
outputstrings = "آخرین آپدیت: "+ seconds + " ثانیه قبل";
}
//document.getElementById("timer").innerHTML = days + "d " + hours + "h "+ minutes + "m " + seconds + "s ";
document.getElementById("timer").innerHTML = outputstrings;
if (distance < 0) {
clearInterval(x);
document.getElementById("timer").innerHTML = "EXPIRED";
}
}, 1000);
</script>
<body>
<div class="container" id="frame">
<h4 class="title"><img class="tf2" src="key.png">
قیمت کلید TF2 در ریجن های مختلف
<a href="https://steampulse.ir/ticket" class="link">قیمت تیکت</a>
</h4>
<div class="table-responsive">
<table>
<thead>
<tr>
<th>ریجن</th>
<th>قیمت</th>
<th>خالص دریافتی بعد کسر مالیات</th>
<th>نرخ مالیات</th>
</tr>
</thead>
<tbody>
<tr>
<td class="regions">🇺🇸 آمریکا<br> 🇦🇷 آرژانتین <br> 🇹🇷 ترکیه </td>
<td><?php echo $USDobj->lowest_price;?></td>
<td><?php echo '$'.number_format((float)$USD/1.15, 2, '.', '')?></td>
<td><?php echo '$'.number_format((float)($USD-$USD/1.15), 2, '.', '')?></td>
</tr>
<!--<tr>
<td class="regions">🇦🇷 آرژاتین</td>
<td><?php echo $ARGobj->lowest_price;?></td>
<td><?php echo '$'.number_format((float)$ARG/1.15, 2, '.', '')?></td>
<td><?php echo '$'.number_format((float)($ARG-$ARG/1.15), 2, '.', '')?></td>
</tr>
<tr>
<td class="regions">🇹🇷 ترکیه</td>
<td><?php echo $TRobj->lowest_price;?></td>
<td><?php echo '$'.number_format((float)$TR/1.15, 2, '.', '')?></td>
<td><?php echo '$'.number_format((float)($TR-$TR/1.15), 2, '.', '')?></td>
</tr>-->
<tr>
<td class="regions">🇺🇦 اوکراین</td>
<td><?php echo $UAobj->lowest_price;?></td>
<td><?php echo number_format((float)$UA/1.15, 2, '.', '').'₴'?></td>
<td><?php echo number_format((float)($UA-$UA/1.15), 2, '.', '').'₴'?></td>
</tr>
<tr>
<td class="regions">🇷🇺 روسیه</td>
<td><?php echo $RUobj->lowest_price;?></td>
<td><?php echo number_format((float)$RU/1.15, 2, '.', '').' pуб.'?></td>
<td><?php echo number_format((float)($RU-$RU/1.15), 2, '.', '').' pуб.'?></td>
</tr>
<tr>
<td class="regions">🇮🇳 هند</td>
<td><?php echo $INobj->lowest_price;?></td>
<td><?php echo '₹ '.number_format((float)$IN/1.15, 2, '.', '')?></td>
<td><?php echo '₹ '.number_format((float)($IN-$IN/1.15), 2, '.', '')?></td>
</tr>
<tr>
<td class="regions">🇧🇷 برزیل</td>
<td><?php echo $BRobj->lowest_price;?></td>
<td><?php echo 'R$ '.number_format((float)$BR/1.15, 2, '.', '')?></td>
<td><?php echo 'R$ '.number_format((float)($BR-$BR/1.15), 2, '.', '')?></td>
</tr>
<tr>
<td class="regions">🇰🇿 قزاقستان</td>
<td><?php echo number_format((float)$KZ, 2, '.', '').'₸'?></td>
<td><?php echo number_format((float)$KZ/1.15, 2, '.', '').'₸'?></td>
<td><?php echo number_format((float)($KZ-$KZ/1.15), 2, '.', '').'₸'?></td>
</tr>
</tbody>
</table>
</div>
<div id="timer" style="float: right;margin-top: 10px;"></div>
<button id="button" onclick="window.location.reload()" type="button" class="update">به روز رسانی</button>
</div>
<p class="copyright">v1.2.1 - ساخته شده با ❤️
توسط
<img class="logo" src="https://gaming-club.ir/wp-content/uploads/2019/07/cropped-icon-32x32.png" width="20" height="20"> <a href="https://gaming-club.ir/">گیمینگ کلاب </a>
x
<img class="logo" src="https://aresgame.ir/wp-content/uploads/2020/07/icon-50x50.png" width="20" height="20"> <a href="https://aresgame.ir/">آرِس گیم</a></p>
</body>
</html>