首页 php教程 PHP源码 利用监控宝来执行Whmcs的自动任务

利用监控宝来执行Whmcs的自动任务

May 25, 2016 pm 05:08 PM

利用监控宝来执行Whmcs的自动任务

<?php
    /*
    * By:  落落
    * To:  GetVM.Com
    * URL: www.MyLuoLuo.Com
    */
    set_time_limit(0);
    $fileName = "count.love";
    $urls = array("http://my.XXXX.net/cron.php"
        ,"http://billing.XXXX.com/cron.php");
    //如果文件不存在
    if(!file_exists($fileName))
    {
        CreateFile($fileName,0);
        exit();
    }
    if (!is_readable($fileName)) {
        //文件不存在或者无法读取
        die(&#39;File does not exist or could not be read!&#39;);
    }else
    {
        $count = file_get_contents($fileName);
        $count++;
        //监控宝有两个节点同时访问,所以这里不是24
        if($count>=48)
        {
            foreach ($urls as $key => $value) {
                file_get_contents($value);
            }
            $count=0;
        }
        echo"$count";
        DeleteFile($fileName);
        CreateFile($fileName,$count);
    }
 
    //创建文件
    function CreateFile($fileName,$value)
    {
        $fp = fopen($fileName, "w+");
        fwrite($fp, $value);
        fclose($fp);
    }
 
    //删除文件
    function DeleteFile($fileName)
    {
        @unlink($fileName);
    }
?>
登录后复制

 以上就是利用监控宝来执行Whmcs的自动任务的内容,更多相关内容请关注PHP中文网(www.php.cn)!

本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)