-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
54 lines (43 loc) · 2.62 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[/foo/bar]]></title>
<link href="http://dflima.github.io/atom.xml" rel="self"/>
<link href="http://dflima.github.io/"/>
<updated>2013-10-04T21:51:53+00:00</updated>
<id>http://dflima.github.io/</id>
<author>
<name><![CDATA[Danilo Lima]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Validando emails com PHP]]></title>
<link href="http://dflima.github.io/blog/2013/10/04/validando-emails-com-php/"/>
<updated>2013-10-04T21:07:00+00:00</updated>
<id>http://dflima.github.io/blog/2013/10/04/validando-emails-com-php</id>
<content type="html"><![CDATA[<p>Cansado de escrever funções extensas em javascript ou montar expressões regulares para validar emails na sua aplicação?
Saiba que o PHP oferece uma opção bastante simples para isso!</p>
<p>É a constante <em>FILTER_VALIDATE_EMAIL</em>, da função <em>filter_var()</em>. Veja abaixo como usar</p>
<figure class='code'><figcaption><span>Validando emails</span><a href='https://gist.github.com/dflima/6832922'>link</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='php'><span class='line'><span class="nv">$email</span> <span class="o">=</span> <span class="s2">"[email protected]"</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">if</span><span class="p">(</span><span class="nb">filter_var</span><span class="p">(</span><span class="nv">$email</span><span class="p">,</span> <span class="nx">FILTER_VALIDATE_EMAIL</span><span class="p">))</span> <span class="p">{</span>
</span><span class='line'> <span class="k">echo</span> <span class="s2">"Email válido."</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p>Por hoje é só. Até a próxima!</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[First Post]]></title>
<link href="http://dflima.github.io/blog/2013/10/03/first-post/"/>
<updated>2013-10-03T17:45:00+00:00</updated>
<id>http://dflima.github.io/blog/2013/10/03/first-post</id>
<content type="html"><![CDATA[<h3>First Blog</h3>
<p>This is my first blog post using <em>markdown</em></p>
]]></content>
</entry>
</feed>