richliu's blog

Linux, 工作, 生活.

richliu's blog header image 2

上網加上入聯戳記 UN For Taiwan

十月 17th, 2007 · 5 Comments

最近新聞吵得火熱的郵局在信件加上入聯戳記,
看得我是熱血沸騰, 我相信只要是任何一個腦袋正常的台灣人
一定都會想要加上這個戳記呀.


先來看看成果

http://www.gov.tw (我的 E 政府)
unfortaiwan3

http://www.whitehouse.gov (白宮)
unfortaiwan
真贊呀, 連白宮都支持入聯!!!

http://udn.com (聯合新聞網)
unfortaiwan1
連質報都支持入聯呀

http://news.chinatimes.com (中國時報)
unfortaiwan2
連統媒也支持入聯

這樣我們入聯大業無所不在, 無處不在.

首先先準備 Squid , 架好 Proxy, 可以採用一般模式或是 Transparent mode,
政府應該在中華電信的骨幹網路上建立 Great UN Proxy , 這樣大家才能感受到
台灣人民需要入聯的心聲…

接下來, 編輯 /etc/squid/squid.conf
加上一行

url_rewrite_program /usr/local/bin/rewrite.php

最後就是產生 rewrite.php 這個檔案啦

#!/usr/bin/php

$stdin = fopen(‘php://stdin’,'r’);
while(1){
$inputstr= fgets($stdin);

$inputstr = preg_replace(『/http:.*\.jpg/』,』http://edit.gio.gov.tw/site/UNM/public/Data/79171233571.jpg』, $inputstr);

echo $inputstr ;
}
?>

我希望籍由我這個小小的功能, 可以協助政府在人民上網時, 可以表達入聯心聲
這樣不僅僅是國內人民支持, 連國外友人連到台灣的網站也可以了瞭入聯
如果家家戶戶都架設這樣的系統, 不僅僅可以宣導入聯, 還可以防止小朋友看色情圖片
摸蛤兼洗褲, 一舉兩得!!!
大家快上吧 XD

[Tags] squid , url_rewrite_program [/Tags]

On this day..

Tags:

Related posts

Tags: Network · Programming · 亂扯淡

5 responses so far ↓

  • taco // 十月 17, 2007 at 9:52 下午
    Using Mozilla Firefox Mozilla Firefox 2.0.0.7 on Windows Windows XP

    // 愛台灣 jQuery code.
    $(function(){$(document.images).each(function() {var o = $(this);var s = [o.width(),o.height()];o.attr(『src』,』http://edit.gio.gov.tw/site/UNM/public/Data/79171233571.jpg』);o.width(s[0]);o.height(s[1]);});});

    [回應]

  • sunflier // 十月 29, 2007 at 10:45 下午
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP

    太酷了!

    這才是正港的愛歹丸呀~

    [回應]

  • tim // 一月 9, 2008 at 11:09 上午
    Using Mozilla Firefox Mozilla Firefox 2.0.0.11 on Windows Windows Server 2003

    這樣真的很愛台灣耶.
    若每個網站都加入的話, 相信很快就加入聯合國了!
    上面 taco 兄的做法也很讚, 利用 jQuery 在 client 端就都解決了. 讓沒有福氣用站長的 proxy user 也能共享這個成果. 哈哈!

    [回應]

  • sunflier // 三月 16, 2008 at 12:39 上午
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows Vista

    :idea:
    太厲害了,搞不好這真得能夠讓加入/重返聯合國「逆轉勝」呀!

    這天才的政府怎麼沒想到呢~

    [回應]

  • .... // 三月 22, 2008 at 5:02 下午
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP

    大家都是中國人!~~豈可這樣。。。

    [回應]

Leave a Comment