全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1376|回复: 4

Online监控代码

[复制链接]
发表于 2017-11-23 14:57:22 | 显示全部楼层 |阅读模式

Online 特价监控

说明看代码配置. 这个需要知道最新的offerid, 如果需要自己翻论坛。
如需改造,基本差不多。


  1. <?php


  2. //=========================================Config info====================================================
  3. $offerid = "728";         // 728:  7欧1t ,   774: 7欧ssd
  4. $title = "Online-7o1t";  //微信通知标题
  5. $desp = "Online 7o1t";     //微信通知内容
  6. $key = 'SCU6641T52d189fd61c651c03ba188a41a2280a558c8155d8c5677';  //方糖的微信通知的key,自己登录“http://sc.ftqq.com”申请

  7. //=========================================main selection====================================================
  8. $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";


  9. $data = shell_exec($cmd);
  10. if ( strpos($data,"unavailable")) {
  11.     echo "sold out";
  12.     // sc_send ("没货",$desp,$key);
  13. }
  14. else
  15. {

  16.     echo "Yoho";
  17.     sc_send ($title,$desp,$key);
  18. }





  19. //=========================================function ====================================================

  20. function sc_send($text, $desp = '', $key ="") {
  21.     $postdata = http_build_query(
  22.     array('text' => $text, 'desp' => $desp));
  23.     $opts = array('http' =>
  24.         array(
  25.             'method'  => 'POST',
  26.             'header'  => 'Content-type: application/x-www-form-urlencoded',
  27.             'content' => $postdata
  28.         )
  29.     );
  30.     $context = stream_context_create($opts);
  31.     return $result = file_get_contents('http://sc.ftqq.com/'.$key.'.send', false, $context);
  32. }
复制代码

发表于 2017-11-23 14:58:16 来自手机 | 显示全部楼层
耍猴offline黑五没活动
发表于 2017-11-23 15:07:47 来自手机 | 显示全部楼层
大佬今天有点兴奋啊
发表于 2017-11-23 15:09:52 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-3 08:00 , Processed in 0.502054 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表