Copy_N_Paste Programming/php

check email 存不存在

if ($_SERVER[argc]<2) { printf(“Usage : %s filename\n”,$_SERVER[‘argv’][0]); exit; } $filename=strftime(“%H%M.txt”); $out=fopen($filename,”a”); $counter=0; $fp=fopen($_SERVER[‘argv’][1],”r”); while ($data=fgets($fp,2000)) { $data=str_replace(“\r”,””,$data); $data=str_replace(“\n”,””,$data); if (checkmail($data)==TRUE) { printf(“%s : %s \tGOOD_EMAIL!\n”,$counter,$data); fputs($out,$data.”\n”); } else printf(“%s : %s \tBAD_EMAIL!\n”,$counter,$data); $counter++; } fclose($fp); fclose($out); exit; // ——- function checkmail($mail){ $host = explode(‘@’,$mail); list($account,$host) = $host; if (!getmxrr($host,$mxa)) $mxa = array($host); while (list ($key, […]


好用的 postfix mail log 統計軟體 pflogsumm is designed to provide an over-view of postfix activity, with just enough detail to give the administrator a “heads up” for potential trouble spots. emerge net-mail/pflogsumm URL: