<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/xslt/rss2.xsl" media="screen"?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Latest from 飞腿站长站's 技术</title>
		<link>http://www.feitui.com/go/tech</link>
		<description>这是一个站长建站交流和共享的地方</description>
		<category>Technology</category>
		<language>zh_cn</language>
		<item>
			<title>Linux通过ssh做代理的方法 ... no reply</title>
			<link>http://www.feitui.com/topic/view/380.html</link>
			<comments>http://www.feitui.com/topic/view/380.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Linux</category>
			<description>
			Linux客户端下开启socks代理的方法是运行 &lt;br /&gt;
ssh -CNf -D7777 test@192.168.0.1 &lt;br /&gt;
其中7777是socks代理的端口，这个数字可以任意修改，&lt;br /&gt;
test是ssh的用户名，看具体情况而定，192.168.0.1是IP地址。
			</description>
			<pubDate>Tue, 23 Sep 2008 13:21:08 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/380.html</guid>
		</item>
		<item>
			<title>构建安全rsync ... no reply</title>
			<link>http://www.feitui.com/topic/view/379.html</link>
			<comments>http://www.feitui.com/topic/view/379.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Linux</category>
			<description>
			随着安全要求的提高，我们逐渐采用sftp或scp来取代ftp。然而，可能由于网络状况等原因，使得scp/sftp可能发生中断。为此，不得不很痛苦的重新拷贝文件，不仅麻烦，还严重浪费带宽和时间。在这里，我们采用rsync over ssh的方式，既安全又方便，因为rsync支持断点续传。&lt;br /&gt;
&lt;a href="http://imysql.cn/2008_09_23_secure_rsync_over_ssh" rel="nofollow external" class="tpc"&gt;http://imysql.cn/2008_09_23_secure_rsync_over_ssh&lt;/a&gt;
			</description>
			<pubDate>Tue, 23 Sep 2008 12:33:39 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/379.html</guid>
		</item>
		<item>
			<title>mysql优化--用TIMESTAMP类型取代INT和DATETIME ... no reply</title>
			<link>http://www.feitui.com/topic/view/378.html</link>
			<comments>http://www.feitui.com/topic/view/378.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Mysql</category>
			<description>
			用 INT UNSIGNED 来存储一个转换成Unix时间戳的时间值，认为这样做从索引，比较等角度来讲，都会比较高效。现在我们来对比下 TIMESTAMP 和 INT UNSIGNED 以及 DATETIME 这3种类型到底谁更好。 &lt;br /&gt;
&lt;a href="http://imysql.cn/2008_07_17_timestamp_vs_int_and_datetime" rel="nofollow external" class="tpc"&gt;http://imysql.cn/2008_07_17_timestamp_vs_int_and_datetime&lt;/a&gt;
			</description>
			<pubDate>Tue, 23 Sep 2008 12:32:35 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/378.html</guid>
		</item>
		<item>
			<title>字体css ... no reply</title>
			<link>http://www.feitui.com/topic/view/363.html</link>
			<comments>http://www.feitui.com/topic/view/363.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			支持mac&lt;br /&gt;
&lt;a href="http://www.typechart.com/" rel="nofollow external" class="tpc"&gt;http://www.typechart.com/&lt;/a&gt;
			</description>
			<pubDate>Mon, 08 Sep 2008 14:03:50 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/363.html</guid>
		</item>
		<item>
			<title>xhtml不支持document.body.scrollTo ... no reply</title>
			<link>http://www.feitui.com/topic/view/355.html</link>
			<comments>http://www.feitui.com/topic/view/355.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;br /&gt;
这时document.body.scrollTop始终为0,这时需要用document.documentElement.scrollTop才能获得正确的值&lt;br /&gt;
&lt;br /&gt;
而如果不加xhtml的申明,document.documentElement.scrollTop将为0
			</description>
			<pubDate>Thu, 28 Aug 2008 20:42:52 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/355.html</guid>
		</item>
		<item>
			<title>各种圆角实现方法 ... no reply</title>
			<link>http://www.feitui.com/topic/view/352.html</link>
			<comments>http://www.feitui.com/topic/view/352.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			&lt;a href="http://css-discuss.incutio.com/?page=RoundedCorners" rel="nofollow external" class="tpc"&gt;http://css-discuss.incutio.com/?page=RoundedCorners&lt;/a&gt;
			</description>
			<pubDate>Thu, 21 Aug 2008 21:15:33 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/352.html</guid>
		</item>
		<item>
			<title>SQL Buddy 基于web的mysql管理工具 ... no reply</title>
			<link>http://www.feitui.com/topic/view/343.html</link>
			<comments>http://www.feitui.com/topic/view/343.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Mysql</category>
			<description>
			&lt;img class="code" src="http://www.sqlbuddy.com/images/screen_1_2_7.png" border="0" style="max-width: 500px;" /&gt;&lt;br /&gt;
&lt;a href="http://www.sqlbuddy.com/" rel="nofollow external" class="tpc"&gt;http://www.sqlbuddy.com/&lt;/a&gt;
			</description>
			<pubDate>Wed, 20 Aug 2008 12:02:43 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/343.html</guid>
		</item>
		<item>
			<title>防止他人修改grub用单用户模式启动 ... no reply</title>
			<link>http://www.feitui.com/topic/view/340.html</link>
			<comments>http://www.feitui.com/topic/view/340.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Linux</category>
			<description>
			grub加密码只需要修改grub启动文件，增加一行 password 关键字，可以采用明文存储或者 MD5 加密后存储。下面我们介绍一下用 MD5 加密的方式。&lt;br /&gt;
&lt;br /&gt;
1、先用 /sbin/grub-md5-crypt 产生一个 MD5 密码串&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
/sbin/grub-md5-crypt&lt;br /&gt;
Password: &lt;br /&gt;
Retype password: &lt;br /&gt;
$1$oWpTe$/MWUUYbBlF.2RUZK8nbWU0&lt;br /&gt;
&lt;/div&gt;
原始密码是 "abc"。&lt;br /&gt;
&lt;br /&gt;
2、修改 grub.conf 文件&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
default=0&lt;br /&gt;
timeout=5&lt;br /&gt;
splashimage=(hd0,0)/boot/grub/splash.xpm.gz&lt;br /&gt;
hiddenmenu&lt;br /&gt;
password --md5 $1$oWpTe$/MWUUYbBlF.2RUZK8nbWU0&lt;br /&gt;
title Red Hat Enterprise Linux AS (2.6.x-xx.EL)&lt;br /&gt;
.........&lt;br /&gt;
&lt;/div&gt;
这里要注意， password 这样必须加在 splashimage 和 title 之间这段，否则不能生效。&lt;br /&gt;
然后重启机器，就会发现想要修改 grub 菜单，就必须要先按 P 然后输入正确的密码才可以继续了。&lt;br /&gt;
&lt;br /&gt;
再附上一个用 sed 修改 grub.conf 方法，可以利用这个方法批量修改所有的服务器。&lt;br /&gt;
&lt;br /&gt;
GRUB=/boot/grub/grub.conf&lt;br /&gt;
TEMP=/tmp/grub.conf&lt;br /&gt;
grep -v password $GRUB &amp;&amp; cat $TEMP | sed -e 's/hiddenmenu/hiddenmenu\npassword --md5 \$1\$oWpTe\$\/MWUUYbBlF.2RUZK8nbWU0/g' &amp;gt; $GRUB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://imysql.cn/2008_08_19_grub_enable_md5_crypted" rel="nofollow external" class="tpc"&gt;http://imysql.cn/2008_08_19_grub_enable_md5_crypted&lt;/a&gt;
			</description>
			<pubDate>Tue, 19 Aug 2008 13:12:47 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/340.html</guid>
		</item>
		<item>
			<title>解决 Mysql 大量 unauthenticated user ... no reply</title>
			<link>http://www.feitui.com/topic/view/336.html</link>
			<comments>http://www.feitui.com/topic/view/336.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Mysql</category>
			<description>
			Mysql 大量 unauthenticated user&lt;br /&gt;
Friday, June 03, 2005, 12:29 - Apache &amp; PHP &amp; Mysql&lt;br /&gt;
近日在資料庫方面，發現異常的連線狀況&lt;br /&gt;
該狀況在 mysql 下指令 Show Processlist; 可以看到問題&lt;br /&gt;
該問題如下；&lt;br /&gt;
&lt;br /&gt;
: 3436942 : unauthenticated user : 192.168.0.52:49607 : : Connect : : login :&lt;br /&gt;
: 3436943 : unauthenticated user : 192.168.0.52:49608 : : Connect : : login :&lt;br /&gt;
&lt;br /&gt;
會有非常多的 unauthenticated user 嘗試做登入使用 mysql 的情況&lt;br /&gt;
當這情況在無限制的發生時，就會照成系統的停頓&lt;br /&gt;
&lt;br /&gt;
在經過多方測試，以及詢問官方原廠的回應下&lt;br /&gt;
發現這屬於官方一個系統上的特殊設定，亦可稱呼他為 mysql 的 bug&lt;br /&gt;
不管連結的的方式是經過 hosts 或是 IP 的模式，他都會對 DNS 做反查&lt;br /&gt;
mysqld 會嘗試去反查 IP -&amp;gt; dns ，由於反查解析過慢，無法應付快速多量的查詢&lt;br /&gt;
反查是上層 ISP 所掌控，並不是我們可以解決及要求的&lt;br /&gt;
&lt;br /&gt;
在知道問題的癥結點後，要解決這個問題就有相對應的方法&lt;br /&gt;
其方法分為兩個步驟，第一是開啟 Mysqld 的時候加入特定的參數啟動&lt;br /&gt;
第二就是修改 mysql 的連線設定等，如下所示&lt;br /&gt;
&lt;br /&gt;
    啟動參數； with --skip-name-resolve =&amp;gt;這樣就可以關閉反查動作&lt;br /&gt;
&lt;br /&gt;
    更改 my.cnf；加強以下設定&lt;br /&gt;
    [mysqld]&lt;br /&gt;
    datadir=/services/mysql/&lt;br /&gt;
    socket=/tmp/mysql.sock&lt;br /&gt;
    port=3306&lt;br /&gt;
    set-variable = key_buffer_size=64M&lt;br /&gt;
    set-variable = max_connections=1024&lt;br /&gt;
    set-variable = interactive_timeout=30&lt;br /&gt;
    set-variable = wait_timeout=30&lt;br /&gt;
    set-variable = join_buffer_size=10M&lt;br /&gt;
    set-variable = long_query_time=20&lt;br /&gt;
    set-variable = table_cache=256&lt;br /&gt;
    set-variable = sort_buffer=4M&lt;br /&gt;
    set-variable = record_buffer=1M&lt;br /&gt;
    set-variable = back_log=500&lt;br /&gt;
&lt;br /&gt;
    [mysqld.server]&lt;br /&gt;
    user=mysql&lt;br /&gt;
    basedir=/usr/local&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
經過以上的設定及重新啟動過後，直到現在還沒有看到一個 unauthenticated user 的情況發生&lt;br /&gt;
近日還是會持續的觀察 Mysql 的運作情況，如有問題將會持續的稟報及解決&lt;br /&gt;
&lt;a href="http://blog.chinaunix.net/u/14383/showart.php?id=251621" rel="nofollow external" class="tpc"&gt;http://blog.chinaunix.net/u/14383/showart.php?id=251621&lt;/a&gt;
			</description>
			<pubDate>Fri, 15 Aug 2008 16:37:45 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/336.html</guid>
		</item>
		<item>
			<title>Installing Lighttpd With PHP5 And MySQL Support On Debian Etch ... no reply</title>
			<link>http://www.feitui.com/topic/view/335.html</link>
			<comments>http://www.feitui.com/topic/view/335.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Debian</category>
			<description>
			Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on a Debian Etch server with PHP5 support (through FastCGI) and MySQL support.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.howtoforge.com/lighttpd_mysql_php_debian_etch" rel="nofollow external" class="tpc"&gt;http://www.howtoforge.com/lighttpd_mysql_php_debian_etch&lt;/a&gt;
			</description>
			<pubDate>Tue, 12 Aug 2008 18:49:43 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/335.html</guid>
		</item>
		<item>
			<title>IE6下的空div ... no reply</title>
			<link>http://www.feitui.com/topic/view/333.html</link>
			<comments>http://www.feitui.com/topic/view/333.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			&lt;div class="code"&gt;&lt;br /&gt;
div{&lt;br /&gt;
font-size:0;&lt;br /&gt;
height:0;&lt;br /&gt;
overflow:hidden;&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;
			</description>
			<pubDate>Mon, 11 Aug 2008 21:41:55 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/333.html</guid>
		</item>
		<item>
			<title>使用php发送msn消息的类 ... no reply</title>
			<link>http://www.feitui.com/topic/view/327.html</link>
			<comments>http://www.feitui.com/topic/view/327.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>PHP</category>
			<description>
			&lt;a href="http://downloads.fanatic.net.nz/dev/php/sendMsg.zip" rel="nofollow external" class="tpc"&gt;sendMsg&lt;/a&gt;&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
$sendMsg = new sendMsg();&lt;br /&gt;
&lt;br /&gt;
$sendMsg-&amp;gt;login('sender@hotmail.com', 'password');&lt;br /&gt;
&lt;br /&gt;
$sendMsg-&amp;gt;createSession('recipient@hotmail.com');&lt;br /&gt;
&lt;br /&gt;
$sendMsg-&amp;gt;sendMessage('message', 'Times New Roman', 'FF0000');&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://www.fanatic.net.nz/2005/02/15/send-a-message-using-php/" rel="nofollow external" class="tpc"&gt;http://www.fanatic.net.nz/2005/02/15/send-a-message-using-php/&lt;/a&gt;
			</description>
			<pubDate>Sat, 09 Aug 2008 09:25:49 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/327.html</guid>
		</item>
		<item>
			<title>使用javascript更改某个css class的属性 ... no reply</title>
			<link>http://www.feitui.com/topic/view/325.html</link>
			<comments>http://www.feitui.com/topic/view/325.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>JavaScript</category>
			<description>
			&lt;div class="code"&gt;&lt;br /&gt;
&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;
.orig {&lt;br /&gt;
	display: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;/div&gt;
你想要改变把他的display属性由none改为inline。&lt;br /&gt;
&lt;br /&gt;
解决办法： 在IE里：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
document.styleSheets[0].rules[0].style.display = "inline";&lt;br /&gt;
&lt;/div&gt;
在firefox里：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
document.styleSheets[0].cssRules[0].style.display = "inline";&lt;br /&gt;
&lt;/div&gt;
讨论： 可以做一个函数来搜索特定名字的style对象：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
function getstyle(sname) {&lt;br /&gt;
	for (var i=0;i&amp;lt;document.styleSheets.length;i++) {&lt;br /&gt;
		var rules;&lt;br /&gt;
		if (document.styleSheets[i].cssRules) {&lt;br /&gt;
			rules = document.styleSheets[i].cssRules;&lt;br /&gt;
		} else {&lt;br /&gt;
			rules = document.styleSheets[i].rules;&lt;br /&gt;
		}&lt;br /&gt;
		for (var j=0;j&amp;lt;rules.length;j++) {&lt;br /&gt;
			if (rules[j].selectorText == sname) {&lt;br /&gt;
				return rules[j].style;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;
然后只要：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
getstyle(".orig").display = "inline";&lt;br /&gt;
&lt;/div&gt;
就可以了。
			</description>
			<pubDate>Tue, 05 Aug 2008 14:21:49 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/325.html</guid>
		</item>
		<item>
			<title>GeoIP ... no reply</title>
			<link>http://www.feitui.com/topic/view/324.html</link>
			<comments>http://www.feitui.com/topic/view/324.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>数据库</category>
			<description>
			&lt;strong&gt;What is GeoIP?&lt;/strong&gt;&lt;br /&gt;
GeoIP® is the proprietary technology that drives MaxMind's IP geolocation data and services. GeoIP provides businesses with a non-invasive way to determine geographical and other information about their Internet visitors in real-time. When a person visits your website, GeoIP can determine which country, region, city, postal code, area code the visitor is coming from. Furthermore, GeoIP can provide information such as longitude/latitude, connection speed, ISP, company name, domain name, and whether the IP address is an anonymous proxy or satellite provider.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;How does GeoIP work?&lt;/strong&gt;&lt;br /&gt;
The idea behind GeoIP is simple but the process is complex. We employ user-entered location data from sites that ask web visitors to provide their geographic location. We then run millions of these datasets through a series of algorithms that identify, extract, and extrapolate location points for IP addresses.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;What can GeoIP be used for?&lt;/strong&gt;&lt;br /&gt;
To name a few applications, GeoIP can be used for delivering customized content, targeted ads, web log statistics, digital rights management, and regulatory compliance. In fact, you may already be using GeoIP without realizing it. MaxMind's GeoIP technology has been integrated by many of our partners for ad-serving, fraud screening, web analytics, firewall/spam protection, and anti-phishing/anti-identity theft applications. &lt;br /&gt;
&lt;a href="http://www.maxmind.com/app/ip-locate" rel="nofollow external" class="tpc"&gt;http://www.maxmind.com/app/ip-locate&lt;/a&gt;
			</description>
			<pubDate>Tue, 05 Aug 2008 00:51:16 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/324.html</guid>
		</item>
		<item>
			<title>IE6中双margin宽度的解决 ... no reply</title>
			<link>http://www.feitui.com/topic/view/323.html</link>
			<comments>http://www.feitui.com/topic/view/323.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			解决方案是:把浮动容器的display属性定为inline，bug解决.&lt;br /&gt;
例子:&lt;br /&gt;
#div{&lt;br /&gt;
      margin:0 0 0 100px;&lt;br /&gt;
      display:inline;&lt;br /&gt;
}
			</description>
			<pubDate>Mon, 04 Aug 2008 12:57:40 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/323.html</guid>
		</item>
		<item>
			<title>margin和padding ... no reply</title>
			<link>http://www.feitui.com/topic/view/322.html</link>
			<comments>http://www.feitui.com/topic/view/322.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			margin和padding用来隔开元素，margin是隔开元素与外边，padding是隔开元素里边。
			</description>
			<pubDate>Mon, 04 Aug 2008 12:25:03 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/322.html</guid>
		</item>
		<item>
			<title>IE6中的div最小高度 ... no reply</title>
			<link>http://www.feitui.com/topic/view/320.html</link>
			<comments>http://www.feitui.com/topic/view/320.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			问：为什么我设置的div的高度是1px，为什么看不到效果啊，div老是那么高。&lt;br /&gt;
&lt;br /&gt;
答：给你的div加一个属性：font-size:0;&lt;br /&gt;
说明：&lt;br /&gt;
这个问题出现在IE6中；&lt;br /&gt;
IE6中的div默认有个最小字体高度，div的最小高度就是这个高度，除非你改变这个字体的大小。&lt;br /&gt;
这样来加： .style1{height:1px;font-size:0;}&lt;br /&gt;
&lt;br /&gt;
比如想用一个div来做一个1px高的红色线条&lt;br /&gt;
&lt;br /&gt;
在没有设置字体大小的时候会得到的情况：&lt;br /&gt;
&amp;lt;style type="text/css"&amp;gt;  &lt;br /&gt;
.style1{   &lt;br /&gt;
height:1px;   &lt;br /&gt;
background:red;   &lt;br /&gt;
}   &lt;br /&gt;
&amp;lt;/style&amp;gt;  &lt;br /&gt;
&amp;lt;div class="style1"&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;
.style1{&lt;br /&gt;
height:1px;&lt;br /&gt;
background:red;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class="style1"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
设置了font-size:0会得到的情况：&lt;br /&gt;
&amp;lt;style type="text/css"&amp;gt; &lt;br /&gt;
.style1{   &lt;br /&gt;
font-size:0;   &lt;br /&gt;
height:1px;   &lt;br /&gt;
background:red;   &lt;br /&gt;
}   &lt;br /&gt;
&amp;lt;/style&amp;gt;  &lt;br /&gt;
  &lt;br /&gt;
&amp;lt;div class="style1"&amp;gt;&amp;lt;/div&amp;gt;
			</description>
			<pubDate>Mon, 04 Aug 2008 01:50:20 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/320.html</guid>
		</item>
		<item>
			<title>MySQLDumper 备份工具 ... no reply</title>
			<link>http://www.feitui.com/topic/view/307.html</link>
			<comments>http://www.feitui.com/topic/view/307.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Mysql</category>
			<description>
			MySQLDumper features&lt;br /&gt;
&lt;br /&gt;
 MySQLDumper is a backupscript for MySQL-Databases, written in PHP and Perl.&lt;br /&gt;
&lt;br /&gt;
MySQLDumper uses a proprietary technique to avoid execution interruption. It only reads and saves a certain amount of commands and then calls itself via JavaScript and memorizes how far in the process it was and resumes its action from its last standby.&lt;br /&gt;
&lt;br /&gt;
MySQLDumper restores a backup file by using the same process. Unlike other tools splitting and splicing of large files is no longer necessary.&lt;br /&gt;
&lt;br /&gt;
MySQLDumper offers to write data directly into a compressed gz-File. The Restore-Script is able to read this file directly without unpacking it. Of course you can use it without compression, however using Gzip saves a sizeable amount of bandwidth.&lt;br /&gt;
Features:&lt;br /&gt;
&lt;br /&gt;
    * Multilingual&lt;br /&gt;
    * Backup and restore of MySQL-Databases&lt;br /&gt;
    * Automatic sending of backups via Email or FTP&lt;br /&gt;
    * Automatic deleting of backups on the server following your own rules&lt;br /&gt;
    * Using a Perl script as a Cronjob&lt;br /&gt;
    * Administration and manipulation of databases&lt;br /&gt;
    * Backup of database-structures (without data)&lt;br /&gt;
    * Backup and restore of tables&lt;br /&gt;
    * Protecting your backup via ".htaccess file"&lt;br /&gt;
    * Reveals PHP , MySQL version and configuration details and more...!&lt;br /&gt;
    * Easy installation&lt;br /&gt;
    * Easy operating&lt;br /&gt;
    * Multipart-Backup for very large databases&lt;br /&gt;
    * Multi-database-Backup!&lt;br /&gt;
&lt;a href="http://www.mysqldumper.de/en/" rel="nofollow external" class="tpc"&gt;http://www.mysqldumper.de/en/&lt;/a&gt;
			</description>
			<pubDate>Tue, 22 Jul 2008 11:32:41 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/307.html</guid>
		</item>
		<item>
			<title>使用ssh和rsync实现symfony项目的增量更新 ... no reply</title>
			<link>http://www.feitui.com/topic/view/304.html</link>
			<comments>http://www.feitui.com/topic/view/304.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>Symfony</category>
			<description>
			sync依赖于ssh，所以我们首先要配置好ssh，先在本地环境（你的home目录）生成ssh的key&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~$ ssh-keygen -t rsa&lt;br /&gt;
&lt;/div&gt;
提示问题的时候，一路回车就行了。上面这一步做完之后，会在home目录下生成.ssh的目录和两个key文件：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~$ ls .ssh&lt;br /&gt;
id_rsa  id_rsa.pub&lt;br /&gt;
&lt;/div&gt;
id_rsa是私有密钥，id_rsa.pub是公有密钥。下面要将公有密钥拷贝到dreamhost上去，注意把下面的your_id和xxx换成你的id和主机名：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~$ scp ~/.ssh/id_rsa.pub your_id@xxx.dreamhost.com:~/&lt;br /&gt;
&lt;/div&gt;
cp是远程拷贝命令，拷贝的时候会提示你输入密码，输入你在dreamhost上的密码就行了。拷贝完成后，测试一下ssh可以了没：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~$ ssh your_id@xxx.dreamhost.com&lt;br /&gt;
&lt;/div&gt;
同样，换成你自己的用户名和主机名，并输入密码，如果ok，那么你现在已经用ssh登录到dreamhost上了。不要退出，在dreamhost主机上把你的公有密钥添加到认证文件中：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@dreamhost:~$ mkdir .ssh&lt;br /&gt;
test@dreamhost:~$ cat id_rsa.pub &amp;gt;&amp;gt; .ssh/authorized_keys&lt;br /&gt;
test@dreamhost:~$ rm id_rsa.pub&lt;br /&gt;
&lt;/div&gt;
接着，修改一下文件和目录权限：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@dreamhost:~$ chmod 700 ~/.ssh&lt;br /&gt;
test@dreamhost:~$ chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
&lt;/div&gt;
OK，配置完毕，按Ctrl-D退出，下面你应该已经回到你的本地环境了。再测试一下ssh登录，这回应该不需要输入密码了：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~$ ssh your_id@xxx.dreamhost.com&lt;br /&gt;
&lt;/div&gt;
如果上面的登录能够成功，那么ssh就算完全配好了，再次退出回到本地环境。下面来配置symfony的rsync，让它支持增量更新。修改你的symfony项目下面的config/properties.ini文件如下，注意替换成你自己的信息：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
[prod]&lt;br /&gt;
  name=your_project_name&lt;br /&gt;
  host=xxx.dreamhost.com&lt;br /&gt;
  port=22&lt;br /&gt;
  user=your_login_name_on_dreamhost&lt;br /&gt;
  dir=/home/your_login_name_on_dreamhost/your_project_dir&lt;br /&gt;
&lt;/div&gt;
修改完毕，保存退出。下面用symfony的sync命令测试一下：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~/your_project$ symfony sync prod&lt;br /&gt;
&lt;/div&gt;
如果没有问题，你应该会看到一串文件列表，这表示本地修改过，需要进行同步的文件，然后让我们来同步这些文件：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
test@debian:~/your_project$ symfony sync prod go&lt;br /&gt;
&lt;/div&gt;
你会发现，同步进行的非常快，比普通ftp快很多，而且你不必担心会有遗漏，因为sync已经替你做好了文件比较的工作，只要本地更新过的文件，全部都已经同步到远程主机上了。OK，大功告成，It’s simple, right?&lt;br /&gt;
&lt;br /&gt;
另外，symfony项目下面还有一个config/rsync_exclude.txt文件，你可以把你不需要的目录和文件列在里面，这样同步的时候就会忽略这些文件和目录，比如log，cache目录等等。&lt;br /&gt;
&lt;br /&gt;
原文:&lt;a href="http://www.bolarn.com/index.php/2008/01/20/41/" rel="nofollow external" class="tpc"&gt;http://www.bolarn.com/index.php/2008/01/20/41/&lt;/a&gt;
			</description>
			<pubDate>Thu, 17 Jul 2008 19:18:24 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/304.html</guid>
		</item>
		<item>
			<title>IE6下PNG透明（IE7、Firefox本身支持） ... no reply</title>
			<link>http://www.feitui.com/topic/view/295.html</link>
			<comments>http://www.feitui.com/topic/view/295.html#reply</comments>
			<dc:creator>蓝色梦幻</dc:creator>
			<author>蓝色梦幻</author>
			<!--<enclosure url="http://www.feitui.com/img/p/1.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_s.jpg" type="image/jpeg" />
			<enclosure url="http://www.feitui.com/img/p/1_n.jpg" type="image/jpeg" />-->
			<category>网页设计</category>
			<description>
			&lt;div class="code"&gt;&lt;br /&gt;
.div{&lt;br /&gt;
background:url(http://w3css.com/down/imgw3css.png)no-repeat;&lt;br /&gt;
+background:none; filter: progid: DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src="http://w3css.com/down/imgw3css.png"); &lt;br /&gt;
width: 100px; height: 30px;}&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
使用了png透明后，在ie下会出现超链接不可点的情况。&lt;br /&gt;
&lt;br /&gt;
解决方法：a{position:relative}
			</description>
			<pubDate>Sat, 14 Jun 2008 11:16:36 +0800</pubDate>
			<guid>http://www.feitui.com/topic/view/295.html</guid>
		</item>
	</channel>
</rss>