全球主机交流论坛
标题:
Online监控代码
[打印本页]
作者:
Eric.c
时间:
2017-11-23 14:57
标题:
Online监控代码
Online 特价监控
说明看代码配置. 这个需要知道最新的offerid, 如果需要自己翻论坛。
如需改造,基本差不多。
<?php
//=========================================Config info====================================================
$offerid = "728"; // 728: 7欧1t , 774: 7欧ssd
$title = "Online-7o1t"; //微信通知标题
$desp = "Online 7o1t"; //微信通知内容
$key = 'SCU6641T52d189fd61c651c03ba188a41a2280a558c8155d8c5677'; //方糖的微信通知的key,自己登录“http://sc.ftqq.com”申请
//=========================================main selection====================================================
$cmd ="curl 'https://console.online.net/en/order/server_limited' -H 'Pragma: no-cache' -H 'Origin: https://www.online.net' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2,ja;q=0.2,fr;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: no-cache' -H 'Referer: https://www.online.net/en/summer-2017/sales' -H 'Cookie: PHPSESSID-1=s602745rfibh2929tf6jh5o251; SERVERID=web-dc2; _pk_ref.2.3d3d=%5B%22%22%2C%22%22%2C1498936258%2C%22https%3A%2F%2Fwww.online.net%2Fen%2Fsummer-2017%2Fsales%22%5D; _pk_id.2.3d3d=20af576204479f2c.1491289136.47.1498936272.1498936258.; _gat_onlineTracker=1; _ga=GA1.2.1668319752.1490860501; _gid=GA1.2.1443765524.1498924054' -H 'Connection: keep-alive' --data 'server_offer=$offerid' --compressed";
$data = shell_exec($cmd);
if ( strpos($data,"unavailable")) {
echo "sold out";
// sc_send ("没货",$desp,$key);
}
else
{
echo "Yoho";
sc_send ($title,$desp,$key);
}
//=========================================function ====================================================
function sc_send($text, $desp = '', $key ="") {
$postdata = http_build_query(
array('text' => $text, 'desp' => $desp));
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
return $result = file_get_contents('http://sc.ftqq.com/'.$key.'.send', false, $context);
}
复制代码
作者:
maiawpyg
时间:
2017-11-23 14:57
怎么用呢
作者:
zrj766
时间:
2017-11-23 14:58
耍猴offline黑五没活动
作者:
总有刁民想害朕
时间:
2017-11-23 15:07
大佬今天有点兴奋啊
作者:
这小指
时间:
2017-11-23 15:09
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/)
Powered by Discuz! X3.4