当前位置: 首页>>代码示例>>PHP>>正文


PHP dyndnsCheckIP函数代码示例

本文整理汇总了PHP中dyndnsCheckIP函数的典型用法代码示例。如果您正苦于以下问题:PHP dyndnsCheckIP函数的具体用法?PHP dyndnsCheckIP怎么用?PHP dyndnsCheckIP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dyndnsCheckIP函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: htmlspecialchars

								<?php 
    echo htmlspecialchars($rfc2136['server']);
    ?>
							</td>
							<td>
								<?php 
    echo htmlspecialchars($rfc2136['host']);
    ?>
							</td>
							<td>
<?php 
    $filename = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}.cache";
    if (file_exists($filename)) {
        print 'IPv4: ';
        if (isset($rfc2136['usepublicip'])) {
            $ipaddr = dyndnsCheckIP($rfc2136['interface']);
        } else {
            $ipaddr = get_interface_ip($rfc2136['interface']);
        }
        $cached_ip_s = explode("|", file_get_contents($filename));
        $cached_ip = $cached_ip_s[0];
        if ($ipaddr != $cached_ip) {
            print '<span class="text-danger">';
        } else {
            print '<span class="text-success">';
        }
        print htmlspecialchars($cached_ip);
        print '</span>';
    } else {
        print 'IPv4: N/A';
    }
开发者ID:hexaclock,项目名称:pfsense,代码行数:31,代码来源:services_rfc2136.php

示例2: array

if (!is_array($config['dyndnses']['dyndns'])) {
    $config['dyndnses']['dyndns'] = array();
}
$a_dyndns =& $config['dyndnses']['dyndns'];
if ($_REQUEST['getdyndnsstatus']) {
    $first_entry = true;
    foreach ($a_dyndns as $dyndns) {
        if ($first_entry) {
            $first_entry = false;
        } else {
            // Put a vertical bar delimiter between the echoed HTML for each entry processed.
            echo "|";
        }
        $filename = "{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
        if (file_exists($filename)) {
            $ipaddr = dyndnsCheckIP($dyndns['interface']);
            $cached_ip_s = split(":", file_get_contents($filename));
            $cached_ip = $cached_ip_s[0];
            if ($ipaddr != $cached_ip) {
                echo "<font color='red'>";
            } else {
                echo "<font color='green'>";
            }
            echo htmlspecialchars($cached_ip);
            echo "</font>";
        } else {
            echo "N/A " . date("H:i:s");
        }
    }
    exit;
}
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:31,代码来源:dyn_dns_status.widget.php

示例3: htmlspecialchars

    echo htmlspecialchars($rfc2136['server']);
    ?>
							</td>
							<td>
								<?php 
    echo htmlspecialchars($rfc2136['host']);
    ?>
							</td>
							<td>
<?php 
    $filename = "{$g['conf_path']}/dyndns_{$rfc2136['interface']}_rfc2136_" . escapeshellarg($rfc2136['host']) . "_{$rfc2136['server']}.cache";
    $if = get_failover_interface($rfc2136['interface']);
    if (file_exists($filename)) {
        print 'IPv4: ';
        if (isset($rfc2136['usepublicip'])) {
            $ipaddr = dyndnsCheckIP($if);
        } else {
            $ipaddr = get_interface_ip($if);
        }
        $cached_ip_s = explode("|", file_get_contents($filename));
        $cached_ip = $cached_ip_s[0];
        if ($ipaddr != $cached_ip) {
            print '<span class="text-danger">';
        } else {
            print '<span class="text-success">';
        }
        print htmlspecialchars($cached_ip);
        print '</span>';
    } else {
        print 'IPv4: N/A';
    }
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:31,代码来源:services_rfc2136.php


注:本文中的dyndnsCheckIP函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。