<?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>検索 | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/%e6%a4%9c%e7%b4%a2/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Mon, 23 Feb 2015 08:54:30 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>検索向けAdSenseの広告の消し方？</title>
		<link>https://uda2.com/blog/adsense/</link>
					<comments>https://uda2.com/blog/adsense/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Fri, 23 May 2008 22:45:49 +0000</pubDate>
				<category><![CDATA[うだうだ]]></category>
		<category><![CDATA[GoogleAdSense]]></category>
		<category><![CDATA[検索]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2008/05/adsense.html</guid>

					<description><![CDATA[<p>このブログは元々、MovableTypeの勉強をする為に作った。 その際何を載せるかで病的に記憶力が無いオレの備忘帳としてWEB制作に関する記事を載せる事にした、だから自分で書いた記事を見る機会が多い。 以前は記事が少な</p>
The post <a href="https://uda2.com/blog/adsense/">検索向けAdSenseの広告の消し方？</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>このブログは元々、MovableTypeの勉強をする為に作った。<br />
その際何を載せるかで病的に記憶力が無いオレの備忘帳としてWEB制作に関する記事を載せる事にした、だから自分で書いた記事を見る機会が多い。<br />
以前は記事が少なくて左のメニュー（カテゴリ）を押したら全て表示されていたんだけど一画面に表示しきれなくて他のブログとかでは「次へ」って出るんだけどMovableTypeには「次へ」って現れない。（なんかやり方あるんだろうけど・・・）<br />
そこで検索ボックスを出すことにした。<br />
MovableTypeが用意してるのを使ってもいいんだけど、久々にGoogleAdsenseを見たら「検索向け AdSense」の項目の横に「改善された機能」って書いてあったのを見つけたんで入れてみる事にした。<br />
この「検索向け AdSense」ってのは検索するだけでも報酬がもらえるって噂です。<br />
（まあ、実際に報酬が頂ける程検索される気はしませんが・・・）</p>
<p><span id="more-635"></span><br />
とりあえず、「検索向け AdSense 」ってのをポチッって押して、項目を埋めていく、</p>
<p>検索タイプ:選択するサイトのみ<br />
選択したサイト:http://uda2.com/blog/<br />
オプション キーワード:ぱお～ん（これは検索結果に付く広告をどんな広告にするかのキーワードらしい、入力しなくてもいい）</p>
<p>サイトの言語:日本語<br />
お客様のサイトのエンコード:Unicode (UTF-8)<br />
Google ドメイン用の国または地域:日本<br />
カスタム チャネル :ウダ2 Blog 検索エンジン<br />
デザイン:<img decoding="async" src="http://www.google.com/coop/intl/ja/images/google_custom_search_watermark.gif"><br />
テキスト ボックスの長さ:31</p>
<p>検索結果のスタイル:自分のサイトに結果を表示する<br />
検索結果を表示する URL を入力:http://uda2.com/blog/adsense.php<br />
検索結果領域の幅を入力:795</p>
<p>広告を表示する地域:右</p>
<p>色はCSSを見たら分かるんだけど面倒なので<a href="http://uda2.com/blog/2007/07/i/">カラーピッカー「色取鳥i」</a>でサイトの色を調べてコピペしていく。<br />
これらの入力が終わると２つのコードが出てくる。<br />
「検索ボックスのコード」は検索するボックスで、<br />
「検索結果のコード 」は検索結果を表示するページに貼る。</p>
<p>「検索ボックスのコード」はウィジェットテンプレートを「Google 検索」みたいな名前で作って、<br />
<textarea></p>
<div class="widget-search widget">
<h3 class="widget-header">検索</h3>
<div class="widget-content">
ココに検索結果のコードを入れる
</div>
</div>
<p></mt:IfTagSearch><br />
</mt:If></textarea><br />
な感じで入れてウィジェット「Google 検索」を配置した。<br />
「検索結果のコード 」はどうしようかと思ったけど検索結果にもメニューが欲しかったので「ウェブページ」を「検索結果」ってタイトルで作って、フォーマットを「改行なし」、ファイル名<br />「adsense.php」って感じにして「検索結果のコード 」をコピペした。</p>
<p>Googleの説明文がカタコトの日本語なんでわかりにくかったけど無事付いた。<br />
なんか右側が入りきらずに文章の途中で切られてるけど・・・<br />
？<br />
広告が無い。</p>
<p>もしかしたら、広告消えるかもと思って広告を右にやってみたんだけど、消えましたね。<br />
Googleに怒られる気もするけどまあいいか。</p>The post <a href="https://uda2.com/blog/adsense/">検索向けAdSenseの広告の消し方？</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/adsense/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>文字列の検索</title>
		<link>https://uda2.com/blog/post_5/</link>
					<comments>https://uda2.com/blog/post_5/#comments</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Tue, 03 Jul 2007 09:30:23 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[文字列]]></category>
		<category><![CDATA[検索]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2007/07/post_5.html</guid>

					<description><![CDATA[<p>文字列の検索する際に使う関数の速度を比較してみた。 preg_match　：　0.156914ms →　preg_match (&#8220;/&#8221;.$pattern.&#8221;/&#8221;, $sub</p>
The post <a href="https://uda2.com/blog/post_5/">文字列の検索</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>文字列の検索する際に使う関数の速度を比較してみた。<br />
preg_match　：　0.156914ms<br />
→　preg_match (&#8220;/&#8221;.$pattern.&#8221;/&#8221;, $subject )<br />
mbereg　：　0.198855ms<br />
→　mbereg ($pattern, $subject )<br />
strpos　：　0.093295667ms<br />
→　strpos($subject ,$pattern) !== false<br />
mb_strpos　：　0.226389333ms<br />
→　mb_strpos($subject , $pattern) !== false<br />
（３回の平均）<br />
当然だけどstrposが一番、<br />
ただmb_strposが遅いのが以外だった。<br />
mberegとmb_strposを比較してもmb_strposの方が遅い、<br />
ただ、今回のテストでmberegはコンパイルエラーが出た。<br />
再読込すると直ったので原因はよく分からない。<br />
数十回に一回ぐらい同じファイルなのに検索結果が違うときがある。<br />
これも再読込すると直る。<br />
負荷をかけすぎなのかもしれないがロリポは何か挙動がおかしい気がする。<br />
（XREAは偶に表示できなくなるけど・・・）<br />
本格的に運用するならもう少し高価なサーバーの方がいいのかもしれない。</p>The post <a href="https://uda2.com/blog/post_5/">文字列の検索</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/post_5/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>PHP：配列の検索</title>
		<link>https://uda2.com/blog/php_2/</link>
					<comments>https://uda2.com/blog/php_2/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Sun, 01 Jul 2007 12:14:12 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[検索]]></category>
		<category><![CDATA[配列]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2007/07/php_2.html</guid>

					<description><![CDATA[<p>配列の中を検索する際の関数としてarray-search を使っていたら、テスト環境（PHPのバージョンが違う）で返す値が違うことが発覚。 いちいちテスト時とアップ時を変えるのが面倒だなと思ってたら in-arrayを使</p>
The post <a href="https://uda2.com/blog/php_2/">PHP：配列の検索</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>配列の中を検索する際の関数として<a href="http://manual.xwd.jp/function.array-search.html">array-search</a><br />
を使っていたら、テスト環境（PHPのバージョンが違う）で返す値が違うことが発覚。<br />
いちいちテスト時とアップ時を変えるのが面倒だなと思ってたら<br />
<a href="http://manual.xwd.jp/function.in-array.html">in-array</a>を使ったら解決した。<br />
<a href="http://manual.xwd.jp/function.in-array.html">in-array</a>もPHPのバージョンにより微妙な違いがあるらしいけど今のところ無問題。</p>The post <a href="https://uda2.com/blog/php_2/">PHP：配列の検索</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/php_2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
