<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>        <title><![CDATA[聿王爺的部落格]]></title>
        <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog]]></link>
        <description><![CDATA[這裡記錄了聿王爺的點點滴滴！]]></description>
  <lastBuildDate>Sat, 29 Nov 2008 13:04:10 +0800</lastBuildDate>
        <language>zh-tw</language>         <item>
            <title><![CDATA[webtolead for salesforce DEMO]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=434]]></link>
            <description><![CDATA[<p>&lt;?php<br>//do quality checks on the incoming data here.</p>
<p>//then bundle the request and send it to Salesforce.com<br>$req&nbsp; = &quot;&amp;lead_source=&quot;. urlencode($_REQUEST[&quot;leadSource&quot;]);<br>$req .= &quot;&amp;first_name=&quot; . urlencode($_REQUEST[&quot;firstName&quot;]);<br>$req .= &quot;&amp;last_name=&quot; . urlencode($_REQUEST[&quot;lastName&quot;]); <br>$req .= &quot;&amp;title=&quot; . urlencode($_REQUEST[&quot;title&quot;]);<br>$req .= &quot;&amp;company=&quot; . urlencode($_REQUEST[&quot;company&quot;]);<br>$req .= &quot;&amp;email=&quot; . urlencode($_REQUEST[&quot;email&quot;]);<br>$req .= &quot;&amp;phone=&quot; . urlencode($_REQUEST[&quot;phone&quot;]);<br>$req .= &quot;&amp;street=&quot; . urlencode($_REQUEST[&quot;street&quot;]);<br>$req .= &quot;&amp;city=&quot; . urlencode($_REQUEST[&quot;city&quot;]); <br>$req .= &quot;&amp;state=&quot; . urlencode($_REQUEST[&quot;state&quot;]);<br>$req .= &quot;&amp;zip=&quot; . urlencode($_REQUEST[&quot;zip&quot;]);<br>$req .= &quot;&amp;debug=&quot; . urlencode(&quot;0&quot;);<br>$req .= &quot;&amp;oid=&quot; . urlencode(&quot;&lt;Your Salesforce Org Id here&gt;&quot;); <br>$req .= &quot;&amp;retURL=&quot; . urlencode(&quot;&lt;Your return url here&gt;&quot;);<br>$req .= &quot;&amp;debugEmail=&quot; . urlencode(&quot;&lt;email for debugging&gt;&quot;);</p>
<p>$header&nbsp; = &quot;POST /servlet/servlet.WebToLead?encoding=UTF-8 HTTP/1.0&#92;r&#92;n&quot;;<br>$header .= &quot;Content-Type: application/x-www-form-urlencoded&#92;r&#92;n&quot;;<br>$header .= &quot;Host: <a href="http://www.salesforce.com&#92;r&#92;n">www.salesforce.com&#92;r&#92;n</a>&quot;;<br>$header .= &quot;Content-Length: &quot; . strlen($req) . &quot;&#92;r&#92;n&#92;r&#92;n&quot;;<br>$fp = fsockopen (&#39;www.salesforce.com&#39;, 80, $errno, $errstr, 30);<br>if (!$fp) {<br>echo &quot;No connection made&quot;;<br>} else {<br>fputs ($fp, $header . $req);<br>while (!feof($fp)) {<br>$res = fgets ($fp, 1024);<br>echo $res;<br>}<br>}<br>fclose($fp);<br>?&gt;</p>]]></description>
            <pubDate>Sat, 29 Nov 2008 13:04:09 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=434]]></guid>
         </item>         <item>
            <title><![CDATA[偵測網址]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=433]]></link>
            <description><![CDATA[&lt;script language=JavaScript&gt;<br>todomain=<a href="http://www.you.com">www.you.com</a>;<br>domain=location.href.replace(&quot;<a href='http://&quot;,&quot;&quot;).split(&quot;/&quot;)[0'>http://&quot;,&quot;&quot;).split(&quot;/&quot;)[0</a>];<br>if(todomain!=domain){&nbsp;<br>alert(&quot;請使用[&quot;+todomain+&quot;]網址訪問本站！現在自動轉址。。。&quot;);&nbsp;<br>location.href=location.href.replace(domain,todomain);}<br>&lt;/script&gt;]]></description>
            <pubDate>Sat, 29 Nov 2008 12:15:29 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=433]]></guid>
         </item>         <item>
            <title><![CDATA[網站圖片檔案等防盜連設定]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=432]]></link>
            <description><![CDATA[<p>只適用linux</p>
<p>編輯 .htaccess 加入下面語句&nbsp;</p>
<p>RewriteEngine on<br>RewriteCond %{HTTP_REFERER} !^http://yourname.com/.*$ [NC]<br>RewriteCond %{HTTP_REFERER} !^http://yourname.com$ [NC]<br>RewriteCond %{HTTP_REFERER} !^http://www.yourname.com/.*$ [NC]<br>RewriteCond %{HTTP_REFERER} !^http://www.yourname.com$ [NC]<br>RewriteRule .*&#92;.(jpg|gif|png|bmp|rar|zip|exe|mpg|mpeg|wmv)$ - [F]</p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:59:40 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=432]]></guid>
         </item>         <item>
            <title><![CDATA[有session返回保留表單資料]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=431]]></link>
            <description><![CDATA[<p>如果有使用session_start();在擋頭，那表單不會留原來key過的<br>這時只要在session_start(); 之前加入<br>session_cache_limiter(&quot;private&quot;);<br>或<br>session_cache_limiter(&quot;public&quot;);</p>
<p>即可!!</p>
<p>session_cache_limiter(&quot;nocache&quot;); 預設不保留</p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:53:50 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=431]]></guid>
         </item>         <item>
            <title><![CDATA[mysql替代字串語句]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=430]]></link>
            <description><![CDATA[UPDATE cdb_posts SET `message` = REPLACE(`message`,&#39;&lt;br&gt;&#39;, &#39;&lt;br&gt;&#92;n&#39;) ;]]></description>
            <pubDate>Sat, 29 Nov 2008 11:50:49 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=430]]></guid>
         </item>         <item>
            <title><![CDATA[驗證是否在焦點上]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=429]]></link>
            <description><![CDATA[<p>&lt;input name=&quot;idname&quot; type=&quot;text&quot;&nbsp; id=&quot;idname&quot; size=&quot;10&quot;&gt;</p>
<p><br>if(document.activeElement.id&nbsp;&nbsp; ==&nbsp;&nbsp; &quot;idname&quot;){<br>......<br>}<br></p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:45:57 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=429]]></guid>
         </item>         <item>
            <title><![CDATA[select傳回選擇第幾個項目的數值]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=428]]></link>
            <description><![CDATA[&lt;select name=&quot;select&quot; id=&quot;select&quot; onchange=&quot;alert(this.selectedIndex);&quot;&gt;<br>&lt;option value=&quot;&quot;&gt;&lt;/option&gt;<br>&nbsp; &lt;option value=&quot;a&quot;&gt;a&lt;/option&gt;<br>&nbsp; &lt;option value=&quot;b&quot;&gt;b&lt;/option&gt;<br>&nbsp; &lt;option value=&quot;c&quot;&gt;c&lt;/option&gt;<br>&lt;/select&gt;]]></description>
            <pubDate>Sat, 29 Nov 2008 11:39:49 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=428]]></guid>
         </item>         <item>
            <title><![CDATA[將big5轉換成10進位]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=427]]></link>
            <description><![CDATA[<p>&lt;?PHP<br>//將big5轉換成10進位<br>$db=mysql_pconnect(&quot;localhost&quot;,&quot;root&quot;,&quot;8763&quot;);<br>mysql_select_db(&quot;test&quot;);<br>mysql_query(&quot;set names big5&quot;);</p>
<p>$sql=&quot;select game_id,game_title,game_details from `cdb_nkflash`&quot;;<br>$result =mysql_query($sql);<br>while($row=mysql_fetch_object($result)){<br>if($row-&gt;game_id != &quot;&quot;){<br><font color="#bf005f">&nbsp;$ccccc=&quot;0x&quot;.bin2hex($row-&gt;game_details);</font><br>&nbsp;if($row-&gt;game_details==&quot;&quot;){$ccccc=&quot;&#39;&#39;&quot;;}<br>$sqla.=&quot;UPDATE `cdb_nkflash` SET `game_title` = 0x&quot;.bin2hex($row-&gt;game_title).&quot;,`game_details` = &quot;.$ccccc.&quot;,`score_unit` = 0xa4c0,`play_fee` = &#39;0&#39; WHERE `game_id`=&#39;&quot;.$row-&gt;game_id.&quot;&#39;;&lt;br&gt;&#92;n&quot;;</p>
<p>//mysql_query($sqla);<br>}<br>}<br>echo $sqla.&quot; 完成!!&lt;br&gt;&quot;;<br>?&gt;</p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:31:42 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=427]]></guid>
         </item>         <item>
            <title><![CDATA[網頁拍照的語法 for php5.2 以上 and IE]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=426]]></link>
            <description><![CDATA[<p><br>$browser = new COM(&quot;InternetExplorer.Application&quot;);<br>$handle = $browser-&gt;HWND;<br>$browser-&gt;Visible = true;<br>$browser-&gt;Fullscreen = true;<br>$browser-&gt;Navigate(&quot;<a href="http://www.comicbaby.com.tw">http://www.comicbaby.com.tw</a>&quot;);</p>
<p>/* Still working? */<br>while ($browser-&gt;Busy) {<br>&nbsp;&nbsp;&nbsp; com_message_pump(4000);<br>}</p>
<p>$im = imagegrabwindow($handle, 0);<br>$browser-&gt;Quit();<br>//imagejpeg($im, &quot;tmp.jpg&quot;);<br>//$old_img=imagecreatefromjpeg(&quot;tmp.jpg&quot;);<br>$new_img = imagecreatetruecolor(200,150);<br>imagecopyresampled($new_img,$im,0,0,0,0,200,150,1024,768);<br>imagejpeg($new_img , &#39;image/&#39;.time().&#39;.jpg&#39;,100);<br>imagedestroy($new_img);</p>
<p>?&gt;</p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:13:46 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=426]]></guid>
         </item>         <item>
            <title><![CDATA[亞馬遜將關閉Alexa網站搜尋服務]]></title>
            <link><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=425]]></link>
            <description><![CDATA[<p>特約記者薛怡青／綜合外電報導 <br>【特約記者薛怡青／綜合外電報導】提供網站排名數據的Alexa網站（Alexa.com），成為許多網站查詢網路流量與網站在全球排名最主要的資源之一，不過，身為Alexa網站母公司的亞馬遜網路書店（Amazon.com）則預計在明年1月底之後，關閉Alexa的網站搜尋功能（Alexa Web Search）。</p>
<p>亞馬遜網路書店在1999年以2億5千萬美元將Alexa網站買下，透過各種演算法的計算方式，提供網站排名的計算，例如其是透過網站每天的平均使用人數，以及平均點閱網頁數為基礎，透過這兩種計算方式以幾何平均數來加以替網站排名，並且Alexa也提供全球各地區域，不同語系的網站分類排名。</p>
<p>雖然Alexa之前的網站排名被知名科技部落格網站的創辦人Michael Arrington批評，Alexa的網站排名的準確性有問題，例如去年曾經公布YouTube網站造訪率大過於Google、以及公布錯誤的Facebook網站造訪率大過於MySpace等，讓Michael Arrington對Alexa的網站排名計算有所質疑。雖然如此，Alexa還是陸續修正了對網站排名與計算的演算方式，目前仍是許多大、小網站觀察流量與排名的參考標地之一。</p>
<p>不過，就在年底母公司的亞馬遜網路書店卻發出聲明，將在明年一月底關閉Alexa的網站搜尋功能。最主要的原因是因為使用率過低，這項服務從2006年開始推出，目前這項服務已經停止新用戶註冊，在2009年1月26日走入歷史。<br></p>]]></description>
            <pubDate>Sat, 29 Nov 2008 11:12:04 +0800</pubDate>
            <guid><![CDATA[http://tw.myblog.yahoo.com/chino-blog/article?mid=425]]></guid>
         </item>        </channel>
        </rss><!-- w11.blog.tpc.yahoo.com uncompressed/chunked Mon Nov  9 06:10:25 CST 2009 -->
