<?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>Marcelo Abib Cardoso &#187; Mobile</title>
	<atom:link href="http://marcelo.todoinfo.com.br/category/mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcelo.todoinfo.com.br</link>
	<description>SQL Server, Dicas, Rails, Mobile</description>
	<lastBuildDate>Wed, 23 Mar 2011 17:41:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mobile &#8211; SiteMap para celular</title>
		<link>http://marcelo.todoinfo.com.br/mobile-sitemap-para-celular/</link>
		<comments>http://marcelo.todoinfo.com.br/mobile-sitemap-para-celular/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 00:29:46 +0000</pubDate>
		<dc:creator>Marcelo Abib Cardoso</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Celular]]></category>
		<category><![CDATA[sitemap]]></category>

		<guid isPermaLink="false">http://marcelo.todoinfo.com.br/?p=96</guid>
		<description><![CDATA[ 
				
			 
				Tweet 
			
	Ola Pessoal,
Em site mobile podemos criar um sitemap e mandar para o google?
A resposta é sim e iremos aprender hoje como criarmos, complicado? Não.
Vejamos abaixo a estrutura de um sitemap de um site convencional e de um para mobile.
Em nosso exemplo colocaremos apenas uma entrada: a página principal.
Estrutura de um sitemap para [...]]]></description>
			<content:encoded><![CDATA[<div style="height:21px; padding-top:2px;" class="really_simple_share"><div style="float:left; width:100px; " class="really_simple_share_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http://marcelo.todoinfo.com.br/mobile-sitemap-para-celular/&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;colorscheme=light&amp;height=21" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:110px; padding-left:10px;" class="really_simple_share_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Mobile &#8211; SiteMap para celular" data-url="http://marcelo.todoinfo.com.br/mobile-sitemap-para-celular/">Tweet</a> 
			</div></div>
	<br style="clear:both;" /><p>Ola Pessoal,</p>
<p>Em site mobile podemos criar um sitemap e mandar para o google?<br />
A resposta é sim e iremos aprender hoje como criarmos, complicado? Não.<span id="more-96"></span></p>
<p>Vejamos abaixo a estrutura de um sitemap de um site convencional e de um para mobile.<br />
Em nosso exemplo colocaremos apenas uma entrada: a página principal.</p>
<p>Estrutura de um sitemap para site convencional:<br />
&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;urlset xmlns=&#8221;http://www.google.com/schemas/sitemap/0.84&#8243;&gt;<br />
&lt;url&gt;<br />
&lt;loc&gt;http://marcelo.todoinfo.com.br&lt;/loc&gt;<br />
&lt;lastmod&gt;2009-04-29&lt;/lastmod&gt;<br />
&lt;changefreq&gt;monthly&lt;/changefreq&gt;<br />
&lt;priority&gt;1.0&lt;/priority&gt;<br />
&lt;/url&gt;<br />
&lt;/urlset&gt;</p>
<p>Agora como fariamos para o site mobile?</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243; ?&gt;<br />
&lt;urlset xmlns=&#8221;http://www.sitemaps.org/schemas/sitemap/0.9&#8243;<br />
xmlns:mobile=&#8221;http://www.google.com/schemas/sitemap-mobile/1.0&#8243;&gt;<br />
&lt;url&gt;<br />
&lt;loc&gt;http://m.logicadigital.info&lt;/loc&gt;<br />
&lt;mobile:mobile/&gt;<br />
&lt;/url&gt;<br />
&lt;/urlset&gt;</p>
<p>Facil né?<br />
E para colocar mais urls é só adicionar o &lt;url&gt;&lt;/url&gt;, assim:<br />
&lt;url&gt;&lt;loc&gt;http://m.logicadigital.info&lt;/loc&gt;&lt;mobile:mobile/&gt;&lt;/url&gt;<br />
&lt;url&gt;&lt;loc&gt;http://m.logicadigital.info/Quem-Somos&lt;/loc&gt;&lt;mobile:mobile/&gt;&lt;/url&gt;</p>
<p>Bom pessoal por hoje é isso ai, fica a dica para criarmos sitemaps para mobiles.<br />
Qualquer dúvida, sugestão ou critica coloquem ai.<br />
Marcelo</p>
]]></content:encoded>
			<wfw:commentRss>http://marcelo.todoinfo.com.br/mobile-sitemap-para-celular/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile: Dicas de como começar a criar um site para Mobile</title>
		<link>http://marcelo.todoinfo.com.br/mobile-dica-iniciando/</link>
		<comments>http://marcelo.todoinfo.com.br/mobile-dica-iniciando/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 02:14:32 +0000</pubDate>
		<dc:creator>Marcelo Abib Cardoso</dc:creator>
				<category><![CDATA[Celular]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[criar]]></category>
		<category><![CDATA[desenvolver]]></category>
		<category><![CDATA[doctype]]></category>

		<guid isPermaLink="false">http://marcelo.todoinfo.com.br/?p=86</guid>
		<description><![CDATA[ 
				
			 
				Tweet 
			
	Olá Pessoal,
Vou colocar aqui algumas dicas e falar um pouco sobre como criar um site para mobile.
Primeira coisa que tem que vir na cabeça quando for desenvolver um site para mobile é não pensar como um site convencional.
Para mobile menos é mais, ou seja, tem que ser objetivo e direto.
Seu site é [...]]]></description>
			<content:encoded><![CDATA[<div style="height:21px; padding-top:2px;" class="really_simple_share"><div style="float:left; width:100px; " class="really_simple_share_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http://marcelo.todoinfo.com.br/mobile-dica-iniciando/&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;colorscheme=light&amp;height=21" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:110px; padding-left:10px;" class="really_simple_share_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Mobile: Dicas de como começar a criar um site para Mobile" data-url="http://marcelo.todoinfo.com.br/mobile-dica-iniciando/">Tweet</a> 
			</div></div>
	<br style="clear:both;" /><p>Olá Pessoal,</p>
<p>Vou colocar aqui algumas dicas e falar um pouco sobre como criar um site para mobile.</p>
<p>Primeira coisa que tem que vir na cabeça quando for desenvolver um site para mobile é não pensar como um site convencional.<span id="more-86"></span><br />
Para mobile menos é mais, ou seja, tem que ser objetivo e direto.<br />
Seu site é de noticias, coloca noticia.<br />
Se o seu site é da empresa, coloque as informações da empresa e o que ela oferece.<br />
Site para celular não é a mesmo site do convencional, então ai vem a primeira dica para quem quer começar:</p>
<p>1- Ler estes dois posts da Talita Pagani<br />
<a title="Talita Pagani" href="http://blog.talitapagani.com/index.asp?cod=58" target="_blank">Websites para mobile não são miniaturas dos sites convencionais &#8211; parte I</a><br />
<a title="Talita Pagani" href="http://blog.talitapagani.com/index.asp?cod=59" target="_blank">Websites para mobile não são miniaturas dos sites convencionais &#8211; parte II</a></p>
<p>Lá ela fala muitas boas práticas para quando for desenvolver o site para mobile.</p>
<p>Outra dica que eu vou dar é que quando uma pessoa começa a desenvolver para mobile vem a pergunta onde testo e onde valido meu mobile para saber se estou no caminho certo?</p>
<p>2- Navegadores<br />
Bom, para testar temos um excelente navegador chamado Opera Mini &#8211; <a title="Opera" href="http://www.opera.com/mini/demo" target="_blank">http://www.opera.com/mini/demo</a>, porém ele necessita o java instalado, mas é um excelente companheiro nas horas de estar desenvolvendo para mobile.</p>
<p>Ótimo, mas só o opera mini?<br />
Não, esta próxima dica, além de dar nota para seu mobile, ele oferece 5 opções de celulares para testes. Vamos a terceira dica.</p>
<p>3- Validando e checando<br />
Para validar seu mobile nada melhor que o W3C &#8211; <a title="W3C" href="http://validator.w3.org/mobile/" target="_blank">http://validator.w3.org/mobile/</a><br />
Nele vai ter os warning, erros e tudo mais.</p>
<p>Para checagem tem um site muito bom, é o ready &#8211; <a title="Ready" href="http://ready.mobi" target="_blank">http://ready.mobi</a><br />
Ele traz informações como: Nota do seu mobile, size(tamanho total), custo dele, tempo gasto para abrir a página, warnings e erros e mobiles para testar seu site.</p>
<p>Hum, mas senti falta de um site para estatistica, ótimo então aqui vai outra dica, que veio do mobileadsbrasil via twitter &#8211; <a title="MobileAdsBrasil" href="http://www.twitter.com/mobileadsbrasil" target="_blank">http://www.twitter.com/mobileadsbrasil</a> .<br />
4- É um site chamado Percent Mobile &#8211; <a title="Percent Mobile" href="http://percentmobile.com" target="_blank">http://percentmobile.com</a><br />
Ele traz quais aparelhos estão acessando, pais, fabricante, dimensão da tela e provedores.<br />
Muito útil a ferramenta.</p>
<p>Outra site é este: <a href="http://www.myrtmobile.com/" target="_blank">http://www.myrtmobile.com/</a> dica de Andre ferraro &#8211; <a href="http://www.twitter.com/andreferraro" target="_blank">http://www.twitter.com/andreferraro</a><br />
O site traz informações e gráficos semelhantes ao percentmobile, assim como visitas de cada celular.</p>
<p>Agora, vou trazer algumas informações uteis, pelo menos me ajudaram na hora de criar um site para mobile.</p>
<p>5- Doctype para mobile<br />
Versão 1.0 &#8211; Mais utilizada<br />
&lt;!DOCTYPE html PUBLIC &#8220;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&#8221; &#8220;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&#8221;&gt;</p>
<p>Versão 1.2<br />
&lt;!DOCTYPE html PUBLIC &#8220;-//WAPFORUM//DTD XHTML Mobile 1.2//EN&#8221; &#8220;http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd&#8221;&gt;</p>
<p>6- Nas imagens tem que vir as proporções certas. Ex: imagem.jpg 750 x 640.<br />
Tem que colocar com todas as informações abaixo:<br />
&lt;img src=&#8221;imagem.jpg&#8221; alt=&#8221;Imagem&#8221; title=&#8221;Imagem&#8221; width=&#8221;750&#8243; height=&#8221;640&#8243; /&gt;<br />
Não colocar: px, tamanho diferente do real.</p>
<p>7- Evitar utilizar tabelas, no lugar use div.</p>
<p>8- Não carregar o site para mobile com muitas imagens, lembre-se muitos celulares tem custo por tamanho(size) total, faça um mobile site com menos de 10kb.</p>
<p>9- Site para pesquisa: <a title="Um mobile site por dia" href="http://www.ummobilesitepordia.com.br" target="_blank">www.ummobilesitepordia.com.br</a><br />
Todo dia eles postam um site para mobile.</p>
<p>10- O meu próprio mobile desenvolvido:<br />
<a title="Logica Digital" href="http://m.logicadigital.info" target="_blank">http://m.logicadigital.info</a></p>
<p>11- Utilizem em links o accesskey, para a acessibilidade.</p>
<p>Bom pessoal por enquanto é isso, quem tiver dicas, comentários e etc&#8230;me mandem eu coloco aqui.<br />
Fiquem a vontade, caso apareça algo novo estarei colocando também.</p>
<p>Abraço,<br />
Marcelo</p>
]]></content:encoded>
			<wfw:commentRss>http://marcelo.todoinfo.com.br/mobile-dica-iniciando/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mobile &#8211; Detectando se esta em um aparelho móvel</title>
		<link>http://marcelo.todoinfo.com.br/mobile-detectando-se-esta-em-um-aparelho-movel/</link>
		<comments>http://marcelo.todoinfo.com.br/mobile-detectando-se-esta-em-um-aparelho-movel/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 18:39:55 +0000</pubDate>
		<dc:creator>Marcelo Abib Cardoso</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://marcelo.todoinfo.com.br/?p=75</guid>
		<description><![CDATA[ 
				
			 
				Tweet 
			
	Fala pessoal,
Achei um codigo tanto em PHP quanto em ASP para detectar se você esta em um aparelho móvel.
Segue:
ASP
&#60;%
Option Explicit
Dim user_agent, mobile_browser, Regex, match, mobile_agents, mobile_ua, i, size

user_agent = Request.ServerVariables("HTTP_USER_AGENT")

mobile_browser = 0

Set Regex = New RegExp
With Regex
   .Pattern = "(up.browser&#124;up.link&#124;mmp&#124;symbian&#124;smartphone&#124;midp&#124;wap&#124;phone&#124;windows ce&#124;pda&#124;mobile&#124;mini&#124;palm)"
   .IgnoreCase = True
   .Global = [...]]]></description>
			<content:encoded><![CDATA[<div style="height:21px; padding-top:2px;" class="really_simple_share"><div style="float:left; width:100px; " class="really_simple_share_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http://marcelo.todoinfo.com.br/mobile-detectando-se-esta-em-um-aparelho-movel/&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;colorscheme=light&amp;height=21" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:110px; padding-left:10px;" class="really_simple_share_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Mobile &#8211; Detectando se esta em um aparelho móvel" data-url="http://marcelo.todoinfo.com.br/mobile-detectando-se-esta-em-um-aparelho-movel/">Tweet</a> 
			</div></div>
	<br style="clear:both;" /><p>Fala pessoal,</p>
<p>Achei um codigo tanto em PHP quanto em ASP para detectar se você esta em um aparelho móvel.</p>
<p>Segue:<span id="more-75"></span></p>
<p><strong>ASP</strong></p>
<pre class="geshifilter-vb">&lt;%
<span style="color: #b1b100;">Option</span> <span style="color: #b1b100;">Explicit</span>
<span style="color: #b1b100;">Dim</span> user_agent, mobile_browser, Regex, match, mobile_agents, mobile_ua, i, size

user_agent = Request.<span style="color: #66cc66;">ServerVariables</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"HTTP_USER_AGENT"</span><span style="color: #66cc66;">)</span>

mobile_browser = <span style="color: #cc66cc;">0</span>

<span style="color: #b1b100;">Set</span> Regex = <span style="color: #b1b100;">New</span> RegExp
<span style="color: #b1b100;">With</span> Regex
   .<span style="color: #66cc66;">Pattern</span> = <span style="color: #ff0000;">"(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|windows ce|pda|mobile|mini|palm)"</span>
   .<span style="color: #66cc66;">IgnoreCase</span> = <span style="color: #b1b100;">True</span>
   .<span style="color: #66cc66;">Global</span> = <span style="color: #b1b100;">True</span>
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">With</span>

match = Regex.<span style="color: #66cc66;">Test</span><span style="color: #66cc66;">(</span>user_agent<span style="color: #66cc66;">)</span>

<span style="color: #b1b100;">If</span> match <span style="color: #b1b100;">Then</span> mobile_browser = mobile_browser<span style="color: #cc66cc;">+1</span>

<span style="color: #b1b100;">If</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span>Request.<span style="color: #66cc66;">ServerVariables</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"HTTP_ACCEPT"</span><span style="color: #66cc66;">)</span>, <span style="color: #ff0000;">"application/vnd.wap.xhtml+xml"</span><span style="color: #66cc66;">)</span> <span style="color: #b1b100;">
Or</span> <span style="color: #b1b100;">Not</span> <span style="color: #b1b100;">IsEmpty</span><span style="color: #66cc66;">(</span>Request.<span style="color: #66cc66;">ServerVariables</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"HTTP_X_PROFILE"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>
<span style="color: #b1b100;">Or</span> <span style="color: #b1b100;">Not</span> <span style="color: #b1b100;">IsEmpty</span><span style="color: #66cc66;">(</span>Request.<span style="color: #66cc66;">ServerVariables</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"HTTP_PROFILE"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span>
   mobile_browser = mobile_browser<span style="color: #cc66cc;">+1</span>
<span style="color: #b1b100;">end</span> <span style="color: #b1b100;">If</span>

mobile_agents = <span style="color: #b1b100;">Array</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"w3c "</span>, <span style="color: #ff0000;">"acs-"</span>, <span style="color: #ff0000;">"alav"</span>, <span style="color: #ff0000;">"alca"</span>, <span style="color: #ff0000;">"amoi"</span>, <span style="color: #ff0000;">"audi"</span>, <span style="color: #ff0000;">"avan"</span>, <span style="color: #ff0000;">"benq"</span>, <span style="color: #ff0000;">"bird"</span>, <span style="color: #ff0000;">
"blac"</span>, <span style="color: #ff0000;">"blaz"</span>, <span style="color: #ff0000;">"brew"</span>, <span style="color: #ff0000;">"cell"</span>, <span style="color: #ff0000;">"cldc"</span>, <span style="color: #ff0000;">"cmd-"</span>, <span style="color: #ff0000;">"dang"</span>, <span style="color: #ff0000;">"doco"</span>, <span style="color: #ff0000;">"eric"</span>, <span style="color: #ff0000;">"hipt"</span>,
<span style="color: #ff0000;">"inno"</span>, <span style="color: #ff0000;">"ipaq"</span>, <span style="color: #ff0000;">"java"</span>, <span style="color: #ff0000;">"jigs"</span>, <span style="color: #ff0000;">"kddi"</span>, <span style="color: #ff0000;">"keji"</span>, <span style="color: #ff0000;">"leno"</span>, <span style="color: #ff0000;">"lg-c"</span>, <span style="color: #ff0000;">"lg-d"</span>, <span style="color: #ff0000;">"lg-g"</span>, <span style="color: #ff0000;">"lge-"</span>, <span style="color: #ff0000;">"maui"</span>, <span style="color: #ff0000;">
"maxo"</span>, <span style="color: #ff0000;">"midp"</span>, <span style="color: #ff0000;">"mits"</span>, <span style="color: #ff0000;">"mmef"</span>, <span style="color: #ff0000;">"mobi"</span>, <span style="color: #ff0000;">"mot-"</span>, <span style="color: #ff0000;">"moto"</span>, <span style="color: #ff0000;">"mwbp"</span>, <span style="color: #ff0000;">"nec-"</span>, <span style="color: #ff0000;">"newt"</span>, <span style="color: #ff0000;">"noki"</span>, <span style="color: #ff0000;">"oper"</span>, <span style="color: #ff0000;">
"palm"</span>, <span style="color: #ff0000;">"pana"</span>, <span style="color: #ff0000;">"pant"</span>, <span style="color: #ff0000;">"phil"</span>, <span style="color: #ff0000;">"play"</span>, <span style="color: #ff0000;">"port"</span>, <span style="color: #ff0000;">"prox"</span>, <span style="color: #ff0000;">"qwap"</span>, <span style="color: #ff0000;">"sage"</span>, <span style="color: #ff0000;">"sams"</span>, <span style="color: #ff0000;">"sany"</span>, <span style="color: #ff0000;">"sch-"</span>,
 <span style="color: #ff0000;">"sec-"</span>, <span style="color: #ff0000;">"send"</span>, <span style="color: #ff0000;">"seri"</span>, <span style="color: #ff0000;">"sgh-"</span>, <span style="color: #ff0000;">"shar"</span>, <span style="color: #ff0000;">"sie-"</span>, <span style="color: #ff0000;">"siem"</span>, <span style="color: #ff0000;">"smal"</span>, <span style="color: #ff0000;">"smar"</span>, <span style="color: #ff0000;">"sony"</span>, <span style="color: #ff0000;">"sph-"</span>, <span style="color: #ff0000;">"symb"</span>,
<span style="color: #ff0000;">"t-mo"</span>, <span style="color: #ff0000;">"teli"</span>, <span style="color: #ff0000;">"tim-"</span>, <span style="color: #ff0000;">"tosh"</span>, <span style="color: #ff0000;">"tsm-"</span>, <span style="color: #ff0000;">"upg1"</span>, <span style="color: #ff0000;">"upsi"</span>, <span style="color: #ff0000;">"vk-v"</span>, <span style="color: #ff0000;">"voda"</span>, <span style="color: #ff0000;">"wap-"</span>, <span style="color: #ff0000;">"wapa"</span>, <span style="color: #ff0000;">"wapi"</span>,
<span style="color: #ff0000;">"wapp"</span>, <span style="color: #ff0000;">"wapr"</span>, <span style="color: #ff0000;">"webc"</span>, <span style="color: #ff0000;">"winw"</span>, <span style="color: #ff0000;">"winw"</span>, <span style="color: #ff0000;">"xda"</span>, <span style="color: #ff0000;">"xda-"</span><span style="color: #66cc66;">)</span>
size = <span style="color: #b1b100;">Ubound</span><span style="color: #66cc66;">(</span>mobile_agents<span style="color: #66cc66;">)</span>
mobile_ua = <span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">(</span><span style="color: #b1b100;">Left</span><span style="color: #66cc66;">(</span>user_agent, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>

<span style="color: #b1b100;">For</span> i=<span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">To</span> size
   <span style="color: #b1b100;">If</span> mobile_agents<span style="color: #66cc66;">(</span>i<span style="color: #66cc66;">)</span> = mobile_ua <span style="color: #b1b100;">Then</span>
      mobile_browser = mobile_browser<span style="color: #cc66cc;">+1</span>
      <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">For</span>
   <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span>
<span style="color: #b1b100;">Next</span>

<span style="color: #b1b100;">If</span> mobile_browser&gt;<span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span>
   Response.<span style="color: #b1b100;">Write</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"Mobile!"</span><span style="color: #66cc66;">)</span>
<span style="color: #b1b100;">Else</span>
   Response.<span style="color: #b1b100;">Write</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"Not mobile!"</span><span style="color: #66cc66;">)</span>
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span>

%&gt;

<strong>PHP</strong></pre>
<div class="geshifilter">
<pre class="geshifilter-php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>

<span style="color: #ff0000;">$mobile_browser</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">;</span>

<span style="color: #b1b100;">if</span><span style="color: #66cc66;">(</span><a href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i'</span><span style="color: #66cc66;">,</span> <a href="http://www.php.net/strtolower"><span style="color: #000066;">strtolower</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_USER_AGENT'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    <span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">++;</span>
<span style="color: #66cc66;">}</span>

<span style="color: #b1b100;">if</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><a href="http://www.php.net/strpos"><span style="color: #000066;">strpos</span></a><span style="color: #66cc66;">(</span><a href="http://www.php.net/strtolower"><span style="color: #000066;">strtolower</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_ACCEPT'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'application/vnd.wap.xhtml+xml'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> or
 <span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_X_WAP_PROFILE'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span> or <a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_PROFILE'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    <span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">++;</span>
<span style="color: #66cc66;">}</span>    

<span style="color: #ff0000;">$mobile_ua</span> <span style="color: #66cc66;">=</span> <a href="http://www.php.net/strtolower"><span style="color: #000066;">strtolower</span></a><span style="color: #66cc66;">(</span><a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_USER_AGENT'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000;">$mobile_agents</span> <span style="color: #66cc66;">=</span> <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span>
    <span style="color: #ff0000;">'w3c '</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'acs-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'alav'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'alca'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'amoi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'audi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'avan'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'benq'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'bird'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'blac'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'blaz'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'brew'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'cell'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'cldc'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'cmd-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'dang'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'doco'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'eric'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'hipt'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'inno'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'ipaq'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'java'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'jigs'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'kddi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'keji'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'leno'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'lg-c'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'lg-d'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'lg-g'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'lge-'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'maui'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'maxo'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'midp'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'mits'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'mmef'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'mobi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'mot-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'moto'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'mwbp'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'nec-'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'newt'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'noki'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'oper'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'palm'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'pana'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'pant'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'phil'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'play'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'port'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'prox'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'qwap'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sage'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sams'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sany'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sch-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sec-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'send'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'seri'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sgh-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'shar'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'sie-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'siem'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'smal'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'smar'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sony'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'sph-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'symb'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'t-mo'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'teli'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'tim-'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'tosh'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'tsm-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'upg1'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'upsi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'vk-v'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'voda'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'wap-'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'wapa'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'wapi'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'wapp'</span><span style="color: #66cc66;">,</span>
    <span style="color: #ff0000;">'wapr'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'webc'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'winw'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'winw'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'xda'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'xda-'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">;</span>

<span style="color: #b1b100;">if</span><span style="color: #66cc66;">(</span><a href="http://www.php.net/in_array"><span style="color: #000066;">in_array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$mobile_ua</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">$mobile_agents</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    <span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">++;</span>
<span style="color: #66cc66;">}</span>

<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span><a href="http://www.php.net/strpos"><span style="color: #000066;">strpos</span></a><span style="color: #66cc66;">(</span><a href="http://www.php.net/strtolower"><span style="color: #000066;">strtolower</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'ALL_HTTP'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'OperaMini'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    <span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">++;</span>
<span style="color: #66cc66;">}</span>

<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span><a href="http://www.php.net/strpos"><span style="color: #000066;">strpos</span></a><span style="color: #66cc66;">(</span><a href="http://www.php.net/strtolower"><span style="color: #000066;">strtolower</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$_SERVER</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'HTTP_USER_AGENT'</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'windows'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    <span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">}</span>

<span style="color: #b1b100;">if</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">$mobile_browser</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
   <span style="color: #808080; font-style: italic;">// do something</span>
<span style="color: #66cc66;">}</span>
<span style="color: #b1b100;">else</span> <span style="color: #66cc66;">{</span>
   <span style="color: #808080; font-style: italic;">// do something else</span>
<span style="color: #66cc66;">}</span>   

<span style="color: #000000;">?&gt;

Os dois código podem ser achados aqui:
<a href="http://mobiforge.com/developing/story/lightweight-device-detection-php" target="_blank">http://mobiforge.com/developing/story/lightweight-device-detection-php</a>
<a href="http://mobiforge.com/developing/story/lightweight-device-detection-asp" target="_blank">http://mobiforge.com/developing/story/lightweight-device-detection-asp</a></span></pre>
</div>
<pre class="geshifilter-vb">Abraço</pre>
]]></content:encoded>
			<wfw:commentRss>http://marcelo.todoinfo.com.br/mobile-detectando-se-esta-em-um-aparelho-movel/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

