在网页上显示CoreTemp远程监控温度

时间:2017-07-12 17:31:59

标签: php ajax curl get monitoring

我想在我的个人网站上展示CoreTemp正在监控的内容。 CoreTemp报告我可以告诉JSON格式。但是,当我执行cron或GET请求时,似乎没有任何内容从CoreTemp页面显示。我认为这可能与它有关,它必须在http://localhost:5200/的本地网页上显示之前返回5个结果。

CoreTemp监控页面的示例输出:

{"CpuInfo":
    {"uiLoad":[2,3],
    "uiTjMax":[100],
    "uiCoreCnt":2,
    "uiCPUCnt":1,
    "fTemp":[49,48],
    "fVID":1.065918,
    "fCPUSpeed":3292.04028,
    "fFSBSpeed":99.7588,
    "fMultiplier":33,
    "CPUName":"Intel Core i5 4310M (Haswell) ",
    "ucFahrenheit":0,
    "ucDeltaToTjMax":0,
    "ucTdpSupported":1,
    "ucPowerSupported":1,
    "uiStructVersion":2,
    "uiTdp":[37],
    "fPower":[5.889584],
    "fMultipliers":[33,33]},
    "MemoryInfo":{
        "TotalPhys":16282,
        "FreePhys":8473,
        "TotalPage":17304,
        "FreePage":8473,
        "TotalVirtual":8388608,
        "FreeVirtual":8388003,
        "FreeExtendedVirtual":1,
        "MemoryLoad":47}}

同样,我甚至无法通过简单的GET或来自php的curl请求显示任何数据。

简单的PHP代码:

<?php
$exe = curl_init();
curl_setopt($exe, CURLOPT_URL, "http://localhost:5200/");
curl_setopt($exe, CURLOPT_HEADER, 0);
curl_setopt($exe, CURLOPT_RETURNTRANSFER, 1);
$raw = curl_exec($exe);
curl_close($exe);
echo $raw;

我缺少什么或者这本身就是监控插件的问题?

0 个答案:

没有答案
相关问题