URL : http://www.dublish.com/articles/10.html
- Use NOT NULL as default value as much as you can, it speeds up execution and saves one bit.
- 一個 <? … ?> 比多個 <? .. ?><? .. ?><? .. ?> 還快
- 少用 . 去串接字串, 改用這樣的較快 “select addr,name from tbl_addr where id=$id”
- 或者用 ‘ “ 區分出 需要 PHP 不解譯/解譯的字串
- echo 比 print 快
- 在 loop 前就把終值先算好, 放變數裡,NG: for($i=0; $i<strlen($str); $i++) ….
Share on Facebook
Comments Off

先到 https://www.dyndns.com/ 申請 “Custom DNS Service” (每年USD$29元)


- The domain is registered elsewhere: You will need to log into your account with the domain’s current registrar, and change the nameserver list to the following:
Custom DNS Nameservers
| Server |
IP Address |
| ns1.mydyndns.org (Required) |
204.13.248.76 |
| ns2.mydyndns.org (Required) |
204.13.249.76 |
| ns3.mydyndns.org |
208.78.69.76 |
| ns4.mydyndns.org |
91.198.22.76 |
| ns5.mydyndns.org |
203.62.195.76 |

在 router (我的是ddwrt) 設定 DDNS – ADSL 每次換 IP 時 ddwrt 就會通知 dyndns 改 DNS 的 IP address , 其他的 DN 也可以用 CNAME 設成跟這個 host name 一樣.

去 google apps 申請一個

除了 mail 要設 MX record 比較複雜, 其他的只要設 CNAME record 就可以了, 很簡單!

mail.monster.tw 是 web mail 界面的網址 跟 收信的 domain 是不同的

Share on Facebook
Comments Off
URL : http://www.10minutemail.com/10MinuteMail/
很多網站要申請加入會員都需要一個 email address , 這個十分鐘電郵就是可以用來作這件事, 收到會員的啟用連結後, 就可以跟這個 email 說再見了!

Share on Facebook
Comments Off
不過 , 這邊有指定 eth0 , 若 server 有很多 interface 的話就要注意一下了.
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
int main( int argc, char *argv[] )
{
int s;
struct ifreq buffer;
s = socket(PF_INET, SOCK_DGRAM, 0);
memset(&buffer, 0x00, sizeof(buffer));
strcpy(buffer.ifr_name, "eth0");
ioctl(s, SIOCGIFHWADDR, &buffer);
close(s);
for( s = 0; s < 6; s++ )
{
printf("%.2X ", (unsigned char)buffer.ifr_hwaddr.sa_data[s]);
}
printf("\n");
return 0;
}
Share on Facebook
Comments Off
有趣的 ASCII ART : http://www.network-science.de/ascii/
Font: larry3d Reflection: no Adjustment: left Stretch: no Width: 80 Text: monster
__
/\ \__
___ ___ ___ ___ ____\ \ ,_\ __ _ __
/' __` __`\ / __`\ /' _ `\ /',__\\ \ \/ /'__`\/\`'__\
/\ \/\ \/\ \/\ \_\ \/\ \/\ \/\__, `\\ \ \_/\ __/\ \ \/
\ \_\ \_\ \_\ \____/\ \_\ \_\/\____/ \ \__\ \____\\ \_\
\/_/\/_/\/_/\/___/ \/_/\/_/\/___/ \/__/\/____/ \/_/
Share on Facebook
Comments Off