-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheckSickwBalance.php
20 lines (19 loc) · 1.04 KB
/
checkSickwBalance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$url = "http://sickw.com/api.php?show=yes&key=L6W-74T-TCD-9CU-N9K-O3T-TVF-XOB&service=31&imei=355372083868962";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, '300');
$response = curl_exec($ch);
$header = curl_getinfo($ch);
curl_close($ch);
strpos($response, "Remaining Balance: ");
$balance = trim(substr($response, strpos($response, "Remaining Balance: ") + 19));
if(isset($_GET['show']) && $_GET['show'] == 'yes') echo "Current Sickw balance: $${balance}";
if($balance < 5) {
define('INCLUDE_CHECK', true);
require 'eMail.php';
Notify_me("Sickw balance getting low", "Sickw balance is approaching a critical level.<br/>Current balance: $${balance}<br/>Think about reloading the account as soon as possible.<br/><br/><a href='https://www.prounlockphone.com/checkSickwBalance.php?show=yes'>Check how much we have now!</a><br/><br/>This email was automatically generated by the API checker Cron Job.");
}
?>