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

利用监控宝来执行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

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

EditPlus 中文破解版

EditPlus 中文破解版

體積小,語法高亮,不支援程式碼提示功能

WebStorm Mac版

WebStorm Mac版

好用的JavaScript開發工具