【发布时间】:2013-05-05 09:18:21
【问题描述】:
如果端口没有响应(false)下面的这个脚本,如何添加电子邮件功能发送?
<?php
function test_port($host,$port=80,$timeout=6)
{
$fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
if ( ! $fsock )
{
return FALSE;
}
else
{
return TRUE;
}
}
/* check our website http://www.example.com is up and running (port 80) and timeout after 20 seconds */
$ok = test_port('IP/website',80,20);
?>
【问题讨论】:
-
请再次阅读常见问题解答:stackoverflow.com/faq - 提问前请先搜索您的问题。我写这个特别是因为你当前形式的“问题”是没有的。通过首先搜索,您可能会找到您正在寻找的信息。
-
-1 from me:这个问题没有显示任何研究工作;不清楚或没用。