search
Homephp教程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)!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment