<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Azan 黃贊臣 &#187; 程式設計</title>
	<atom:link href="http://tommy.ironman.tw/category/program/feed/" rel="self" type="application/rss+xml" />
	<link>http://tommy.ironman.tw</link>
	<description>網頁設計文章的蒐集與整理</description>
	<lastBuildDate>Sun, 18 Dec 2011 15:59:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>如何使用獲取用戶IP地址的三個屬性以得到使用者的真實IP(HTTP_X_FORWARDED_FOR,HTTP_VIA,REMOTE_ADDR)</title>
		<link>http://tommy.ironman.tw/get_user_ip_use_http_x_forwarded_for_http_via_remote_addr/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get_user_ip_use_http_x_forwarded_for_http_via_remote_addr</link>
		<comments>http://tommy.ironman.tw/get_user_ip_use_http_x_forwarded_for_http_via_remote_addr/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 11:04:58 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[HTTP_VIA]]></category>
		<category><![CDATA[HTTP_X_FORWARDED_FOR]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[REMOTE_ADDR]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3344</guid>
		<description><![CDATA[有些人會使用proxy這個方法來達到網頁加速的目的，但是這麼一來也間接地讓php傳統的偵測ip方式無法偵測到使用者真實的ip。而如果有心人士要攻擊網站，又走proxy的話，這時怎麼得到他的真實ip呢？ 你可以透過以下的方法來偵測： &#60;?php if (!empty($_SERVER[&#39;HTTP_CLIENT_IP&#39;])) $ip=$_SERVER[&#39;HTTP_CLIENT_IP&#39;]; else if (!empty($_SERVER[&#39;HTTP_X_FORWARDED_FOR&#39;])) $ip=$_SERVER[&#39;HTTP_X_FORWARDED_FOR&#39;]; else $ip=$_SERVER[&#39;REMOTE_ADDR&#39;]; echo $ip; ?&#62; &#160; &#160; 一、沒有使用代理服務器的情況： &#160; &#160; &#160; REMOTE_ADDR = 您的 IP &#160; &#160; &#160; HTTP_VIA = 沒數值或不顯示 &#160; &#160; &#160; HTTP_X_FORWARDED_FOR = 沒數值或不顯示 二、使用透明代理服務器的情況：Transparent Proxies &#160; &#160; &#160; REMOTE_ADDR = 最後一個代理服務器 IP &#160; &#160; &#160; HTTP_VIA = 代理服務器 IP &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/get_user_ip_use_http_x_forwarded_for_http_via_remote_addr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我也收到強制執行的存證信函了!!</title>
		<link>http://tommy.ironman.tw/i-also-received-letters-demanding-the-enforcement-of-a-deposit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-also-received-letters-demanding-the-enforcement-of-a-deposit</link>
		<comments>http://tommy.ironman.tw/i-also-received-letters-demanding-the-enforcement-of-a-deposit/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 01:17:42 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[程式設計]]></category>
		<category><![CDATA[題外話]]></category>
		<category><![CDATA[詐騙]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3338</guid>
		<description><![CDATA[我們家也收到元誠的查封通知,倒真有其事 趕快以最快速度告訴您的親朋好友喔。要快！ 為什麼要帶鎖匠和管區員警來我家&#160;&#34;強制執行&#34; 的新的詐騙手法&#160;： 注意:「元誠」&#8230; 是討債公司.. 新的詐騙手法&#160; 帶鎖匠和管區員警來我家&#34;強制執行&#34;拿走&#34;動產&#34; --- 的新花招...。&#160; 詐騙集團的犯案手法不斷翻新，稍有不慎即有可能掉入圈套內，請各位提高警覺並且預先告知平時在家的親人。 我昨天回到家看到這封信，本想收信人不對，我就想給它扔，後來我哥說那是 &#34;存証信函&#34; 但卻沒有&#34;封口 &#34;，所以我就打開看，內容就如下圖： 為什麼要帶鎖匠和管區員警要來我家&#34;強制執行&#34;拿走&#34;動產 &#34;呢?&#8230;這太誇張了&#8230;這豈不是公然的強劫嗎？我哥叫我先去警局備案，我向警察伯伯說明來意，警局伯伯就依著信函上的電話撥了過去。 晚上10:00 多了，還有個小姐接。警察劈頭就問那接電話的小姐，妳為什麼寄給我這封信，我沒欠人錢啊&#8230; 那女的說：你的名字和地址？&#160; 警察不說，反問她，為什麼亂寄 存証信函？什麼是法務部？妳們來查封難道不用檢察官陪同嗎？ 那女的結結巴巴答不上來&#8230;&#160; 警察伯伯跟我說：千萬不能跟她們說我正確的住址和名字，以防她們套到妳的資料。 我想收到這封&#34;平信&#34;且 &#34;無封口&#34; 的存証信函的人應該不止我吧！ 千萬要小心，由其是那些獨自在家且容易受騙的老人家，可能會因此受到驚嚇而開啟家門任他們大肆搜括！&#160; 歹徒的新招好簡單，花 10秒鐘看看吧！ 若你用提款卡去排隊提款，前面有一個斯文女孩，很大動作讓你看到她的提款卡插不進提款機；問你借卡試一試，你不以為意的借給她試，當然....你的卡可插入沒問題。&#160; 那女孩交還卡給你時，就已經換掉了卡，便喃喃自語的離開。&#160; 怎知你按密碼時沒法提款；那麼你就會多按幾次密碼，就在你按密碼的時候，排在你後面，她的同黨記住你的密碼，用電話通知剛才的女孩，用你的提款卡提走你的錢！&#160; &#160; &#160; &#160;]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/i-also-received-letters-demanding-the-enforcement-of-a-deposit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JMail中文標題亂碼解決方法</title>
		<link>http://tommy.ironman.tw/jmail-chinese-title-garbled-solution/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jmail-chinese-title-garbled-solution</link>
		<comments>http://tommy.ironman.tw/jmail-chinese-title-garbled-solution/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 00:35:53 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[ISOEncodeHeaders]]></category>
		<category><![CDATA[Jmail]]></category>
		<category><![CDATA[亂碼]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3328</guid>
		<description><![CDATA[這是我無意在手機收Mail時發現的 但在網頁收信就都正常 我發覺有些信件收到時 中文標題呈現亂碼 雖然該頁面是以utf-8格式編碼，且已經有設定 &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62;了 &#160; 而且寄信的JMail程式也有設定 JMail.Charset = &#34;utf-8&#34; &#160; 雖然在網頁收信不會有標題亂碼現象 但在我的iPhone收信時 中文標題卻是亂碼，內文則是正常 &#160; 答案就是要將ISOEncodeHeaders 設為true JMail.ISOEncodeHeaders = true 經測試網頁跟手機就都正常了]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/jmail-chinese-title-garbled-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>靠！twcount統計程式有雷</title>
		<link>http://tommy.ironman.tw/twcount-spam/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=twcount-spam</link>
		<comments>http://tommy.ironman.tw/twcount-spam/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 00:30:41 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[電腦相關]]></category>
		<category><![CDATA[twcount]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3303</guid>
		<description><![CDATA[大家不要上當 這個統計程式藏有一支廣告程式 有嵌入的趕快移除 它會不定時自動跳出一則色情廣告的連結 用Google檢查元素後發現，就是twcount網站 而且無法關閉 點關閉也會強迫轉往該色情網站 重點是它竟然還寫 "網站所有資料全部免費提供" 這是甚麼意思阿，讓不了解的人誤會那就糟了 這是我擷圖後放到Flickr的 它的彈出視窗裡面有寫如下語法： &#60;img src="http://s1.twcount.com/welcome.jpg" href="javascript:void(0)" title="cover" onclick="var lkistbvkp=window.open('http://www.sexdvd2000.com/index.php?id=i18858604', 'jjkrebmz','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes, resizable=yes,width=1280,height=800');lkistbvkp.blur(); document.getElementById('eipyuknjqaz').style.display='none'; document.getElementById('dfekgtivbsw').style.display='none';"&#62; 有安裝的趕快移除吧，要放色情廣告都不通知的，實在太狡猾了！]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/twcount-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>受保護的文章：自訂ckeditor工具列工具</title>
		<link>http://tommy.ironman.tw/ckeditor-custom-toolbar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ckeditor-custom-toolbar</link>
		<comments>http://tommy.ironman.tw/ckeditor-custom-toolbar/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 17:51:49 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ckeditor]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3243</guid>
		<description><![CDATA[受保護的文章不會產生摘要。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/ckeditor-custom-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安裝DNN備忘</title>
		<link>http://tommy.ironman.tw/install-dnn-mem/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-dnn-mem</link>
		<comments>http://tommy.ironman.tw/install-dnn-mem/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 15:25:31 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[DNN]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3233</guid>
		<description><![CDATA[安裝DNN時剛開始還OK 但到最後一個步驟要設定SMTP伺服器時卻卡住了 一直試不正確 後來找到有網友用這個設定成功了 我跟它輸入一樣的SMTP Server：relay-hosting.secureserver.net 不過下方選項我是選擇Anonymous，而不是中間那個Basic 竟然就通過了@@ 在資料庫的PortalAlias 資料表，有個欄位可以改網站路徑，如果安裝時設定錯了，可以手動在此修改就可以了。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/install-dnn-mem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>可以在前端實現的幾個地理位置小功能</title>
		<link>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=can-be-achieved-in-front-of-a-small-number-of-geographical-features</link>
		<comments>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 05:17:44 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[YQL]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3220</guid>
		<description><![CDATA[原文網址：http://www.oncoding.cn/2010/geo-location-frontend/ 在Smashing Magazine上看到這篇Entering The Wonderful World of Geo Location，介紹了獲取並處理用戶地理位置的應用和方法，很有意思。結合原文的內容，加上之前的一些應用，整理了幾個可以完全在前端實現的地理位置相關小功能。 1.通過IP獲取用戶位置 很多時候需要通過IP判斷用戶的位置，通常的辦法是通過自己的後臺程式查詢資料庫得到。如果用戶位置只是應用在前端，或者有其他的特殊原因(比如，懶:)，也有一些其他辦法來快速的獲取用戶位置。 maxmind.com提供了一個服務，通過引入一個js檔(http://j.maxmind.com/app/geoip.js)，可以把他判斷到的用戶的國家、城市、經緯度等資訊加入到頁面中來。下面是從青島訪問這個js檔返回的內容： 我們就可以利用這些資訊做很多東西了：DEMO 另外，騰訊也有一個類似的介面，位址為 http://fw.qq.com/ipaddress，可以得到訪問者的省、市資訊，返回的格式如下： 具體的應用可以看這裏： 斷橋殘雪WordPress天氣插件 2.W3C共用位置介面 HTML5加入了的貢獻地理位置的瀏覽器API介面，目前firefox3.5等瀏覽器已經支援這一功能。 用法： 看 DEMO 3. Google Gears 的 Geolocation API Google Gears是主要提供本地存儲功能的瀏覽器擴展，新版本的Gears中，加入了判斷用戶地理位置的API，通過IP、WIFI熱點等判斷位置。不過Gears的使用似乎並不太廣泛(Chrome內置了Gears，其他瀏覽器需要安裝)，國內的地理位置資訊也不夠豐富，所以這個應用目前只可作為參考。 使用Gears的基本方法看這裏，引入gears_init.js，使用Geolocation API的程式為： 更多內容參考這篇文章：使用Gears獲取當前地理位置，以及DEMO。 4.逆經緯度解析 通過瀏覽器API等方式得到經緯度後，有時需要得到對應的城市名，這就是逆經緯度解析。 google maps api提供了一些經緯度解析方法，如果我們不想引入龐大的api，可以直接使用他的請求位址，通過jsonp方式得到google的經緯度解析資料。jsonp請求位址形式為： http://ditu.google.cn/maps/geo? output=json&#38;oe=utf-8&#38;q=緯度%2C經度 &#38;key=你申請到的key &#38;mapclient=jsapi&#38;hl=zh-CN&#38;callback=myfunction 參數q為經緯度，參數callback為回調函數名。 可以看下這個位址的返回結果，資料非常豐富，並且還是中文的： Yahoo提供的介面 雅虎提供了一些經緯度查詢介面，可以使用YQL查詢。 查詢語句為： 用法： // 08 encodeURIComponent(yql)+'&#038;format=json&#038;diagnostics='+ 09 'false&#038;callback='+callback; 10 11 [...]]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3種jQuery UI Dialog取值、賦值的範例</title>
		<link>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=3-jquery-ui-dialog-get-value-put-value-sample</link>
		<comments>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 04:54:45 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3212</guid>
		<description><![CDATA[由於使用jQuery UI Dialog時，必須將頁面上的值傳送到隱藏的Dialog表單，通常使用時都是在這裡出錯，例如取不到列表上的值，或是取值方法不對，或是取到值卻放不進隱藏表單的input欄位，這樣就無法執行寫入或更新了。 http://jquery.gogogogogogogogogo.com/LoadListTest.php 使用jquery.tablesorter.pager排序 http://jquery.gogogogogogogogogo.com/modiTitle.php http://jquery.gogogogogogogogogo.com/putValueInDialog.php 參考資料： http://www.oncoding.cn/2009/jquery-input-value/]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解決圖層被Flash擋住的終極方法</title>
		<link>http://tommy.ironman.tw/layout-flash-wmode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=layout-flash-wmode</link>
		<comments>http://tommy.ironman.tw/layout-flash-wmode/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 08:10:30 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wmode]]></category>
		<category><![CDATA[擋住]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3199</guid>
		<description><![CDATA[如果網頁上有 Flash 的話，往往 Flash 會把彈出的圖層或是使用jQuery dialog彈出的視窗給擋住，(FF除外，IE6，7，8均出現被擋情況) 解決辦法就是給Flash設置透明的參數：wmode="transparent"。 並在 embed 標籤中設置 wmode="transparent" 如果使用 AC_FL_RunContent，可以加多一對參數 'wmode','transparent' 即可。 如： 如果還是有問題，可以嘗試給 Flash 外面增加一個 DIV 標籤，並給他設置 z-index:0; 的樣式即可。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/layout-flash-wmode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP常用函數</title>
		<link>http://tommy.ironman.tw/asp-common-functions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=asp-common-functions</link>
		<comments>http://tommy.ironman.tw/asp-common-functions/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 18:33:42 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3181</guid>
		<description><![CDATA[ASP常用函數 2003:1:9 ·來源：雲南郵電教育網 Array() FUNCTION: 傳回一個數組 SYNTAX: Array(list) ARGUMENTS: 字元，數字均可 EXAMPLE: &#60;% Dim myArray() For i = 1 to 7 Redim Preserve myArray(i) myArray(i) = WeekdayName(i) Next %&#62; RESULT: 建立了一個包含7個元素的數組myArray myArray("Sunday","Monday", ... ... "Saturday") CInt() FUNCTION: 將一個表達式轉化為數字類型 SYNTAX: CInt(expression) ARGUMENTS: 任何有效的字元均可 EXAMPLE: &#60;% f = "234" response.write cINT(f) + 2 %&#62; RESULT: 236 轉化字元"234"為數字"234"，如果字元串為空，則傳回0值 CreateObject() [...]]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/asp-common-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

