时间:2021-07-01 10:21:17 帮助过:43人阅读
if (isset($_GET['act']) && $_GET['act'] == 'sendMail') { sendEmail();// 发送邮件操作 } function fSockGet($url, $timeout = 3) { $info = parse_url($url); extract($info); $query = isset($query) ? trim($query) : ''; $path = isset($path) ? trim($path) : ''; $fp = fsockopen($host, 80, $errno, $errstr, $timeout); if (!$fp) { exit("$errstr ($errno)
\n"); } $write = fwrite($fp, "GET {$path}?{$query} HTTP/1.0\r\nHost: {$host}\r\n\r\n"); // while (!feof($fp)) { // echo fread($fp, 4096); // } } $url = "http://mydir.com/index.php?act=sendMail"; $emailList = array(...); foreach ($emailList as $email) { fSockGet($url); }