<?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>Bufa Webmaster &#187; validar</title>
	<atom:link href="http://www.bufa.es/tag/validar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bufa.es</link>
	<description>Recursos web en español</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:47:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Función php validar url de dominio</title>
		<link>http://www.bufa.es/funcion-validar-url/</link>
		<comments>http://www.bufa.es/funcion-validar-url/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 00:34:28 +0000</pubDate>
		<dc:creator>Jorge Maiden</dc:creator>
				<category><![CDATA[Funciones]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[función]]></category>
		<category><![CDATA[urls]]></category>
		<category><![CDATA[validar]]></category>

		<guid isPermaLink="false">http://www.bufa.es/?p=228</guid>
		<description><![CDATA[Función en php utilizando una expresión regular para validar cualquier tipo de url de dominio. $url = &#34;http://www.bufa.es&#34;; function valida_url&#40;$url&#41;&#123; &#160; &#160; &#160; if &#40;preg_match&#40;'/^(http&#124;https&#124;ftp):\/\/([\w]*)\.([\w]*)\.(com&#124;net&#124;org&#124;biz&#124;info&#124;mobi&#124;us&#124;cc&#124;bz&#124;tv&#124;ws&#124;name&#124;co&#124;me)(\.[a-z]{1,3})?\z/i', $url&#41;&#41; &#123; &#160; &#160; &#160; &#160; echo 'dominio correcto'; &#160; &#160; &#125;else&#123; &#160; &#160; &#160; ...]]></description>
			<content:encoded><![CDATA[<p>Función en php utilizando una expresión regular para validar cualquier tipo de url de dominio.</p>
<div class="codecolorer-container php railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.bufa.es&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> valida_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/preg_match"><span style="color: #990000;">preg_match</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/^(http|https|ftp):\/\/([\w]*)\.([\w]*)\.(com|net|org|biz|info|mobi|us|cc|bz|tv|ws|name|co|me)(\.[a-z]{1,3})?\z/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'dominio correcto'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'dominio incorrecto'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;">// Modo de uso</span><br />
valida_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bufa.es/funcion-validar-url/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Función php validar email</title>
		<link>http://www.bufa.es/funcion-php-validar-email/</link>
		<comments>http://www.bufa.es/funcion-php-validar-email/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 23:10:27 +0000</pubDate>
		<dc:creator>Jorge Maiden</dc:creator>
				<category><![CDATA[Funciones]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[función]]></category>
		<category><![CDATA[validar]]></category>

		<guid isPermaLink="false">http://www.bufa.es/?p=123</guid>
		<description><![CDATA[La validación del campo email es quizás el más utilizado en la validación de formularios web, este código servirá para validar la dirección de correo electrónico y también para verificar los registros MX del dominio en la dirección email y ...]]></description>
			<content:encoded><![CDATA[<p>La validación del campo email es quizás el más utilizado en la validación de formularios web, este código servirá para validar la dirección de correo electrónico y también para verificar los registros MX del dominio en la dirección email y así comprovar si ese email existe.</p>
<div class="codecolorer-container php railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> valida_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$email</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mx</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp; <br />
&nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/eregi"><span style="color: #990000;">eregi</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mx</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/list"><span style="color: #990000;">list</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$domain</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/split"><span style="color: #990000;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;@&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/getmxrr"><span style="color: #990000;">getmxrr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$domain</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mxrecords</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">else</span> &nbsp;<br />
&nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> &nbsp; <br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bufa.es/funcion-php-validar-email/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

