Sunday, July 30, 2006
Tuesday, July 18, 2006
procmail msql
http://mt.freebsd.org.hk/archives/000029.html
Monday, July 17, 2006
php mail2db
#!/usr/local/bin/php -q
$fd = fopen("php://stdin","r");
while (!feof($fd)) {
$data = fgets($fd, 4096);
if ( eregi("^From:",$data) ) {
$email = eregi_replace( "From: ", "", $data);
$email = str_replace ("\n", "", "$email");
}
if ( eregi("^Subject:",$data) ) {
$subject = eregi_replace( "Subject: ", "", $data);
$subject = str_replace ("\n", "", "$subject");
}
if ( eregi("^Reply-To:",$data) ) {
$replyto = eregi_replace( "Reply-To: ", "", $data);
$replyto = str_replace ("\n", "", "$replyto");
}
if ( eregi("^To:",$data) ) {
$autoresponder = eregi_replace( "To: ", "", $data);
$autoresponder = eregi_replace( "<", "", $autoresponder); $autoresponder = eregi_replace( ">", "", $autoresponder);
$autoresponders = strstr($autoresponder, "@");
$id = str_replace ("$autoresponders", "", "$autoresponder");
}
$testdata = "$testdata$data";
}
fclose ($fd);
Sunday, July 09, 2006
二孔插座的火線與地線
一般水線的洞比較大,火線的洞比較小,
但因為施工單位有時不會注意施工品質而亂放
不知道是火線還是地線,去買驗電筆來測
使用方式:手碰驗點筆"最末端的金屬",
前端插入插座內驗電筆會發光表示那個是火線(有電),
另一個則是地線了~~