问题描述
我运行一个托管服务,我需要能够监控每一个客户(谁使用一个单独的子域,通过的cPanel创建)多少带宽消耗。
I run a hosted service and I need to be able to monitor how much bandwidth every customer (Who uses an individual subdomain, created through cPanel) consumes.
是否有某种方式来触发一个PHP脚本,当一个子域达到一定量的带宽来运行?如果这不是现有的解决方案(我猜想,已经存在像Webalizer的统计模块之一,因为也许一部分),那么我可以有什么应该写一些建议吗?
Is there some way to trigger a PHP script to run when a subdomain reaches a certain amount of bandwidth? If this isn't an existing solution (I would guess as perhaps part of one of the statistic modules that already exist like Webalizer) then can I have some suggestions on what it should be written in?
推荐答案
我想提前道歉这里不提供确切code,因为我不是一个编程的计算机上现在..但我发现了两个链接,你也许可以使用:
I'd like to apologize in advance for not providing exact code here, since I'm not on a programming machine right now.. But I found two links that you might be able to use:
这包含了获取带宽信息资讯:
This contains info on getting bandwidth information:
如何调用API1功能:
How to call the API1 functions:
同样,我不提供任何实际的code抱歉,但你至少可以给这些一读。我没有得到任何cPanels与无论是玩,但我会看看我以后可以抓住的东西。
Again, I'm sorry for not providing any real code, but you can at least give these a read. I haven't got any cPanels to play around with either, but I'll see if I can grab something later.
这篇关于我怎样才能触发脚本时,一个子域达到一定量的带宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!