blog/content/post/2009-06-06-00001174.md

231 lines
26 KiB
Markdown

---
title: perlでcgiを作る
author: kazu634
date: 2009-06-06
url: /2009/06/06/_1268/
wordtwit_post_info:
- 'O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:4647;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}'
categories:
- Perl
---
<div class="section">
<p>
<a href="http://d.hatena.ne.jp/asin/4774134392" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/asin/4774134392', 'これだけは知っておきたい Webアプリケーションの常識');">これだけは知っておきたい Webアプリケーションの常識</a>』の勉強中です:
</p>
<h4>
クッキーの利用
</h4>
<pre class="syntax-highlight">
<span class="synComment"># === Libraries ===</span>
<span class="synStatement">use strict</span>;
<span class="synStatement">use warnings</span>;
<span class="synStatement">use </span>CGI::Cookie;
<span class="synComment"># === Main part ===</span>
<span class="synComment"># Cookieを取得する</span>
<span class="synStatement">my</span> <span class="synIdentifier">%cookies</span> = fetch CGI::Cookie;
<span class="synComment"># countクッキーの値を得て、1増やす</span>
<span class="synStatement">my</span> <span class="synIdentifier">$count</span> = <span class="synConstant"></span>;
<span class="synStatement">if</span> ( <span class="synStatement">defined</span>( <span class="synIdentifier">$cookies</span>{count} ) ) {
<span class="synIdentifier">$count</span> = <span class="synIdentifier">$cookies</span>{count}-&#62;value;
}
<span class="synIdentifier">$count</span>++;
<span class="synComment"># 更新後のcountクッキーを生成する</span>
<span class="synStatement">my</span> <span class="synIdentifier">$cookies</span> = <span class="synStatement">new</span> CGI::Cookie(
-<span class="synConstant">name </span>=&#62; <span class="synConstant">'count'</span>,
-<span class="synConstant">value </span>=&#62; <span class="synIdentifier">$count</span>,
-<span class="synConstant">expire </span>=&#62; <span class="synConstant">'+3M'</span>,
-<span class="synConstant">path </span>=&#62; <span class="synConstant">'/'</span>
);
<span class="synComment"># レスポンスの送信</span>
<span class="synStatement">print</span>(<span class="synConstant">&#34;Set-cookie: </span><span class="synIdentifier">$cookies</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;Content-type: text/html; charset=utf-8</span><span class="synSpecial">\n\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;訪問回数は</span><span class="synIdentifier">$count回です</span><span class="synConstant"></span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
</pre>
<h4>
キャッシュを利用する
</h4>
<pre class="syntax-highlight">
<span class="synComment"># === Libraries ===</span>
<span class="synStatement">use strict</span>;
<span class="synStatement">use warnings</span>;
<span class="synStatement">use </span>Cache::File;
<span class="synComment"># === Main part ===</span>
<span class="synStatement">my</span> <span class="synIdentifier">$cache_msg</span>;
<span class="synComment"># キャッシュの初期化</span>
<span class="synStatement">my</span> <span class="synIdentifier">$cache</span> = Cache::File-&#62;<span class="synStatement">new</span>(<span class="synConstant">cache_root </span>=&#62; <span class="synConstant">'/tmp/cache'</span>);
<span class="synComment"># キャッシュからHTMLを得る</span>
<span class="synStatement">my</span> <span class="synIdentifier">$time_html</span> = <span class="synIdentifier">$cache</span>-&#62;get(<span class="synConstant">'time.html'</span>);
<span class="synComment"># キャッシュが無効なら、HTMLを生成してキャッシュに保存する</span>
<span class="synStatement">if</span> (!<span class="synIdentifier">$time_html</span>) {
<span class="synStatement">my</span> <span class="synIdentifier">@t</span> = <span class="synStatement">localtime</span>;
<span class="synIdentifier">$time_html</span> = <span class="synStatement">sprintf</span>(<span class="synConstant">'現在時刻は %2d 時 %2d 分 %2d 秒です。'</span>, <span class="synIdentifier">$t</span>[<span class="synConstant">2</span>], <span class="synIdentifier">$t</span>[<span class="synConstant">1</span>], <span class="synIdentifier">$t</span>[<span class="synConstant"></span>]);
<span class="synIdentifier">$cache</span>-&#62;set(<span class="synConstant">'time_html'</span>, <span class="synIdentifier">$time_html</span>, <span class="synConstant">'60 sec'</span>);
<span class="synIdentifier">$cache_msg</span> = <span class="synConstant">'キャッシュを更新しました。'</span>;
}
<span class="synComment"># ページの出力</span>
<span class="synStatement">print</span> <span class="synConstant">&#60;&#60;HERE;</span>
<span class="synConstant">Content-type: text/html; charset=utf-8</span>
<span class="synConstant">&#60;title&#62;キャッシュのセット&#60;/title&#62;</span>
<span class="synConstant">&#60;p&#62;</span>
<span class="synIdentifier">$time_html</span><span class="synConstant">&#60;br /&#62;</span>
<span class="synIdentifier">$cache_msg</span>
<span class="synConstant">&#60;/p&#62;</span>
<span class="synConstant">HERE</span>
</pre>
<h4>
簡単なAjaxサンプル
</h4>
<p>
HTMLのページ:
</p>
<pre class="syntax-highlight">
<span class="synComment">&#60;!DOCTYPE htmlUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR.xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">html</span><span class="synIdentifier"> xmlns=</span><span class="synConstant">&#34;http://www.w3.org/1999/xhtml&#34;</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">head</span><span class="synIdentifier">&#62;</span>
<span class="synPreProc"> </span><span class="synIdentifier">&#60;</span><span class="synStatement">title</span><span class="synIdentifier">&#62;</span>The Example of Ajax<span class="synIdentifier">&#60;/</span><span class="synStatement">title</span><span class="synIdentifier">&#62;</span>
<span class="synPreProc"> </span><span class="synIdentifier">&#60;</span><span class="synStatement">meta</span><span class="synIdentifier"> </span><span class="synType">name</span><span class="synIdentifier">=</span><span class="synConstant">&#34;Content-Type&#34;</span><span class="synIdentifier"> </span><span class="synType">content</span><span class="synIdentifier">=</span><span class="synConstant">&#34;text/html; charset=UTF-8&#34;</span><span class="synIdentifier"> /&#62;</span>
<span class="synPreProc"> </span><span class="synIdentifier">&#60;</span><span class="synStatement">meta</span><span class="synIdentifier"> </span><span class="synType">name</span><span class="synIdentifier">=</span><span class="synConstant">&#34;Content-Script-Type&#34;</span><span class="synIdentifier"> </span><span class="synType">content</span><span class="synIdentifier">=</span><span class="synConstant">&#34;text/javascript&#34;</span><span class="synIdentifier"> /&#62;</span>
<span class="synPreProc"> </span><span class="synIdentifier">&#60;/</span><span class="synStatement">head</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">body</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">script</span><span class="synIdentifier"> </span><span class="synType">type</span><span class="synIdentifier">=</span><span class="synConstant">&#34;text/javascript&#34;</span><span class="synIdentifier"> </span><span class="synType">src</span><span class="synIdentifier">=</span><span class="synConstant">&#34;prototype.js&#34;</span><span class="synIdentifier">&#62;&#60;/</span><span class="synStatement">script</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">script</span><span class="synIdentifier"> </span><span class="synType">type</span><span class="synIdentifier">=</span><span class="synConstant">&#34;text/javascript&#34;</span><span class="synIdentifier">&#62;</span>
<span class="synSpecial"> </span><span class="synComment">//&#60;![CDATA[</span>
<span class="synIdentifier">function</span><span class="synSpecial"> lwws</span>()<span class="synSpecial"> </span><span class="synIdentifier">{</span>
<span class="synComment">// 結果の表示先に「しばらくお待ちください」と表示する</span>
<span class="synSpecial"> </span><span class="synStatement">document</span><span class="synSpecial">.getElementById</span>(<span class="synConstant">&#34;result&#34;</span>)<span class="synSpecial">.innerHTML = </span><span class="synConstant">&#34;&#60;p&#62;しばらくお待ちください...&#60;/p&#62;&#34;</span><span class="synSpecial">;</span>
<span class="synSpecial"> </span><span class="synStatement">new</span><span class="synSpecial"> Ajax.Updater</span>(
<span class="synSpecial"> </span><span class="synConstant">&#34;result&#34;</span><span class="synSpecial">, </span><span class="synConstant">&#34;./cgi-bin/weather.pl&#34;</span><span class="synSpecial">,</span>
<span class="synSpecial"> </span><span class="synIdentifier">{</span>
<span class="synSpecial"> parameters : Form.serialize</span>(<span class="synConstant">&#34;ajax&#34;</span>)<span class="synSpecial">,</span>
<span class="synSpecial"> method : </span><span class="synConstant">&#34;get&#34;</span>
<span class="synSpecial"> </span><span class="synIdentifier">}</span>
<span class="synSpecial"> </span>)<span class="synSpecial">;</span>
<span class="synIdentifier">}</span>
<span class="synSpecial"> </span><span class="synComment">//]]&#62;</span>
<span class="synSpecial"> </span><span class="synIdentifier">&#60;/</span><span class="synStatement">script</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">h1</span><span class="synIdentifier">&#62;</span>The Example of Ajax<span class="synIdentifier">&#60;/</span><span class="synStatement">h1</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">form</span><span class="synIdentifier"> </span><span class="synType">method</span><span class="synIdentifier">=</span><span class="synConstant">&#34;get&#34;</span><span class="synIdentifier"> </span><span class="synType">id</span><span class="synIdentifier">=</span><span class="synConstant">&#34;ajax&#34;</span><span class="synIdentifier"> </span><span class="synType">action</span><span class="synIdentifier">=</span><span class="synConstant">&#34;&#34;</span><span class="synIdentifier"> </span><span class="synType">name</span><span class="synIdentifier">=</span><span class="synConstant">&#34;ajax&#34;</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">p</span><span class="synIdentifier">&#62;</span>
都市:
<span class="synIdentifier">&#60;</span><span class="synStatement">select</span><span class="synIdentifier"> </span><span class="synType">name</span><span class="synIdentifier">=</span><span class="synConstant">&#34;city&#34;</span><span class="synIdentifier"> </span><span class="synType">size</span><span class="synIdentifier">=</span><span class="synConstant">&#34;1&#34;</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;4&#34;</span><span class="synIdentifier">&#62;</span>札幌<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;25&#34;</span><span class="synIdentifier">&#62;</span>仙台<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;63&#34;</span><span class="synIdentifier">&#62;</span>東京<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;70&#34;</span><span class="synIdentifier">&#62;</span>横浜<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;38&#34;</span><span class="synIdentifier">&#62;</span>名古屋<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;81&#34;</span><span class="synIdentifier">&#62;</span>大阪<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;90&#34;</span><span class="synIdentifier">&#62;</span>広島<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">option</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;110&#34;</span><span class="synIdentifier">&#62;</span>福岡<span class="synIdentifier">&#60;/</span><span class="synStatement">option</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">select</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">input</span><span class="synIdentifier"> </span><span class="synType">type</span><span class="synIdentifier">=</span><span class="synConstant">&#34;button&#34;</span><span class="synIdentifier"> </span><span class="synType">value</span><span class="synIdentifier">=</span><span class="synConstant">&#34;送信&#34;</span><span class="synIdentifier"> </span><span class="synSpecial">onclick=&#34;lwws</span>()<span class="synSpecial">&#34;</span><span class="synIdentifier"> /&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">p</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">form</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">p</span><span class="synIdentifier">&#62;</span>通信結果<span class="synIdentifier">&#60;/</span><span class="synStatement">p</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">div</span><span class="synIdentifier"> </span><span class="synType">id</span><span class="synIdentifier">=</span><span class="synConstant">&#34;result&#34;</span><span class="synIdentifier">&#62;&#60;/</span><span class="synStatement">div</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">address</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;</span><span class="synStatement">a</span><span class="synIdentifier"> </span><span class="synType">href</span><span class="synIdentifier">=</span><span class="synConstant">&#34;mailto:simoom634@kazu634.local&#34;</span><span class="synIdentifier">&#62;</span><span class="synUnderlined">simoom634</span><span class="synIdentifier">&#60;/</span><span class="synStatement">a</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">address</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">body</span><span class="synIdentifier">&#62;</span>
<span class="synIdentifier">&#60;/</span><span class="synStatement">html</span><span class="synIdentifier">&#62;</span>
</pre>
<p>
Perl側:
</p>
<pre class="syntax-highlight">
<span class="synComment"># === Libraries ===</span>
<span class="synStatement">use strict</span>;
<span class="synStatement">use warnings</span>;
<span class="synStatement">use </span>LWP::Simple;
<span class="synStatement">use </span>XML::Simple;
<span class="synStatement">use </span>CGI;
<span class="synStatement">use utf8</span>;
<span class="synComment"># === Main part ===</span>
<span class="synStatement">my</span> <span class="synIdentifier">$q</span> = <span class="synStatement">new</span> CGI;
<span class="synStatement">my</span> <span class="synIdentifier">$city</span> = <span class="synIdentifier">$q</span>-&#62;param(<span class="synConstant">'city'</span>) || <span class="synConstant">''</span>;
<span class="synStatement">my</span> <span class="synIdentifier">$url</span> = <span class="synConstant">&#34;http://weather.livedoor.com/forecast/webservice/rest/v1?city=${city}&#38;day=tomorrow&#34;</span>;
<span class="synStatement">my</span> <span class="synIdentifier">$xml</span> = get(<span class="synIdentifier">$url</span>);
<span class="synStatement">my</span> <span class="synIdentifier">$data</span> = XMLin(<span class="synIdentifier">$xml</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;Content-type: text/html; charset=utf-8</span><span class="synSpecial">\n\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;</span><span class="synSpecial">\xef\xbb\xbf</span><span class="synConstant">&#34;</span>);
<span class="synStatement">binmode</span>(<span class="synIdentifier">STDOUT</span>, <span class="synConstant">&#34;:utf8&#34;</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;&#60;p&#62;&#34;</span> . <span class="synIdentifier">$data</span>-&#62;{location}-&#62;{city} . <span class="synConstant">&#34;の明日の天気&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synIdentifier">$data</span>-&#62;{telop} . <span class="synConstant">&#34;&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synConstant">&#34;&#60;img src=</span><span class="synSpecial">\&#34;</span><span class="synConstant">&#34;</span> . <span class="synIdentifier">$data</span>-&#62;{image}-&#62;{url} . <span class="synConstant">&#34;</span><span class="synSpecial">\&#34;</span><span class="synConstant"> width=</span><span class="synSpecial">\&#34;</span><span class="synConstant">&#34;</span> . <span class="synIdentifier">$data</span>-&#62;{image}-&#62;{width} . <span class="synConstant">&#34;</span><span class="synSpecial">\&#34;</span><span class="synConstant"> height=</span><span class="synSpecial">\&#34;</span><span class="synConstant">&#34;</span> . <span class="synIdentifier">$data</span>-&#62;{image}-&#62;{height} . <span class="synConstant">&#34;</span><span class="synSpecial">\&#34;</span><span class="synConstant"> alt=</span><span class="synSpecial">\&#34;</span><span class="synConstant">&#34;</span> . <span class="synIdentifier">$data</span>-&#62;{image}-&#62;{title} . <span class="synConstant">&#34;</span><span class="synSpecial">\&#34;</span><span class="synConstant"> /&#62;&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">print</span>(<span class="synIdentifier">$data</span>-&#62;{description} . <span class="synConstant">&#34;&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">if</span> (<span class="synStatement">ref</span> <span class="synIdentifier">$data</span>-&#62;{temperature}-&#62;{min}-&#62;{celsius} <span class="synStatement">eq</span> <span class="synConstant">'HASH'</span>) {
<span class="synStatement">print</span>(<span class="synConstant">&#34;最低気温: データがありません&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
} <span class="synStatement">else</span> {
<span class="synStatement">print</span>(<span class="synConstant">&#34;最低気温: &#34;</span> . <span class="synIdentifier">$data</span>-&#62;{temperature}-&#62;{min}-&#62;{celsius} . <span class="synConstant">&#34;&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
}
<span class="synStatement">if</span> (<span class="synStatement">ref</span> <span class="synIdentifier">$data</span>-&#62;{temperature}-&#62;{max}-&#62;{celsius} <span class="synStatement">eq</span> <span class="synConstant">'HASH'</span>) {
<span class="synStatement">print</span>(<span class="synConstant">&#34;最低気温: データがありません&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
} <span class="synStatement">else</span> {
<span class="synStatement">print</span>(<span class="synConstant">&#34;最低気温: &#34;</span> . <span class="synIdentifier">$data</span>-&#62;{temperature}-&#62;{max}-&#62;{celsius} . <span class="synConstant">&#34;&#60;br /&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
}
<span class="synStatement">print</span>(<span class="synConstant">&#34;&#60;/p&#62;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
</pre>
<h4>
「perl」に関連する最近のエントリ
</h4>
<ul>
<li>
<a href="http://d.hatena.ne.jp/sirocco634/20090603/1244038947" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/sirocco634/20090603/1244038947', ' フォームを用いたデータの受け渡し &#8211; 武蔵の日記');" target="_blank"> フォームを用いたデータの受け渡し &#8211; 武蔵の日記</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/sirocco634/20090531/1243777048" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/sirocco634/20090531/1243777048', ' MySQLのインストール &#8211; 武蔵の日記');" target="_blank"> MySQLのインストール &#8211; 武蔵の日記</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/sirocco634/20090529/1243608618" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/sirocco634/20090529/1243608618', ' AmazonのWebサービスを活用してASIN記法をはき出すPerlスクリプト &#8211; 武蔵の日記');" target="_blank"> AmazonのWebサービスを活用してASIN記法をはき出すPerlスクリプト &#8211; 武蔵の日記</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/sirocco634/20090528/1243522107" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/sirocco634/20090528/1243522107', ' AmazonのWebサービスを使ってみる &#8211; 武蔵の日記');" target="_blank"> AmazonのWebサービスを使ってみる &#8211; 武蔵の日記</a>
</li>
</ul>
<div class="hatena-asin-detail">
<a href="http://www.amazon.co.jp/dp/4774134392/?tag=hatena_st1-22&ascsubtag=d-7ibv" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.amazon.co.jp/dp/4774134392/?tag=hatena_st1-22&ascsubtag=d-7ibv', '');"><img src="https://images-na.ssl-images-amazon.com/images/I/5182m34EgHL._SL160_.jpg" class="hatena-asin-detail-image" alt="これだけは知っておきたい Webアプリケーションの常識" title="これだけは知っておきたい Webアプリケーションの常識" /></a></p>
<div class="hatena-asin-detail-info">
<p class="hatena-asin-detail-title">
<a href="http://www.amazon.co.jp/dp/4774134392/?tag=hatena_st1-22&ascsubtag=d-7ibv" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.amazon.co.jp/dp/4774134392/?tag=hatena_st1-22&ascsubtag=d-7ibv', 'これだけは知っておきたい Webアプリケーションの常識');">これだけは知っておきたい Webアプリケーションの常識</a>
</p>
<ul>
<li>
<span class="hatena-asin-detail-label">作者:</span> <a href="http://d.hatena.ne.jp/keyword/%C6%A3%CB%DC%B0%ED" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/keyword/%C6%A3%CB%DC%B0%ED', '藤本壱');" class="keyword">藤本壱</a>
</li>
<li>
<span class="hatena-asin-detail-label">出版社/メーカー:</span> <a href="http://d.hatena.ne.jp/keyword/%B5%BB%BD%D1%C9%BE%CF%C0%BC%D2" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/keyword/%B5%BB%BD%D1%C9%BE%CF%C0%BC%D2', '技術評論社');" class="keyword">技術評論社</a>
</li>
<li>
<span class="hatena-asin-detail-label">発売日:</span> 2008/03/28
</li>
<li>
<span class="hatena-asin-detail-label">メディア:</span> 大型本
</li>
<li>
<span class="hatena-asin-detail-label">購入</span>: 10人 <span class="hatena-asin-detail-label">クリック</span>: 3,340回
</li>
<li>
<a href="http://d.hatena.ne.jp/asin/4774134392" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/asin/4774134392', 'この商品を含むブログ (14件) を見る');" target="_blank">この商品を含むブログ (14件) を見る</a>
</li>
</ul>
</div>
<div class="hatena-asin-detail-foot">
</div>
</div>
</div>