<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8999220862553390592</id><updated>2025-02-02T05:50:50.805+05:00</updated><category term="PHP"/><category term="Tricks"/><category term="COMObjects"/><category term="Fatal Error Fixes."/><category term="Memory Errors"/><category term="MySQL"/><category term="Tips"/><category term="URL"/><category term="Validate"/><category term="process"/><category term="time"/><category term="timestamp"/><title type='text'>Linux &amp;amp; Web Development Geek - Tips &amp;amp; Tricks</title><subtitle type='html'>PHP,Joomla,WordPress &amp;amp; Linux based server management, error resolutions and fixing problems. </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-5604785976417982062</id><published>2016-05-12T05:45:00.002+05:00</published><updated>2016-05-12T05:45:55.266+05:00</updated><title type='text'>Best Linux Security Tools 2016</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Always trying for a more robust tool to assist you in your work?&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;If there&#39;s one web site UN agency is aware of what&#39;s happening within the field of security tools, it is ToolsWatch. The site covers new tools, and promotes existing projects once they unharness a brand new version.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqh4rWgGkJxSB6UVB272Xq8JbayGtdRfsiw23dFag_2SOvShbCGHyJXGOucAk_Mg18QOo1p90HD6wq1Wu6yN4gLdDNMSIX7kW62gICEfgNVnnSJfWaGcmxMh2LT7jRhgNakkdoHYoIOUk/s1600/dataprotection2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqh4rWgGkJxSB6UVB272Xq8JbayGtdRfsiw23dFag_2SOvShbCGHyJXGOucAk_Mg18QOo1p90HD6wq1Wu6yN4gLdDNMSIX7kW62gICEfgNVnnSJfWaGcmxMh2LT7jRhgNakkdoHYoIOUk/s200/dataprotection2.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the list of &amp;nbsp;Best Security Auditing Tools so far:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #222222; font-family: Helvetica, Tahoma, Verdana, Arial; font-size: 16.0016px; font-stretch: inherit; line-height: 25.6026px; list-style: square inside; margin: 0px 0px 1.5em 2em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;01&lt;/strong&gt;&amp;nbsp;– &lt;a href=&quot;https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project&quot; target=&quot;_blank&quot;&gt;OWASP ZAP – Zed Attack Proxy Project&lt;/a&gt; (+5↑)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;02&lt;/strong&gt;&amp;nbsp;–&amp;nbsp;&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;a href=&quot;http://beefproject.com/&quot; target=&quot;_blank&quot;&gt;BeEF – The Browser Exploitation Framework &lt;/a&gt;(+7&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;↑&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;03&lt;/strong&gt;&amp;nbsp;– &lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;a href=&quot;https://www.hex-rays.com/products/ida&quot; target=&quot;_blank&quot;&gt;IDA Pro&lt;/a&gt;&amp;nbsp;(NEW)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;04&lt;/strong&gt;&amp;nbsp;– &lt;a href=&quot;https://www.faradaysec.com/&quot; target=&quot;_blank&quot;&gt;Faraday&lt;/a&gt;&amp;nbsp;(NEW)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;05&lt;/strong&gt;&amp;nbsp;–&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;a href=&quot;https://cisofy.com/lynis/&quot; target=&quot;_blank&quot;&gt;Lynis&lt;/a&gt; (+4&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 16.0016px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 25.6026px;&quot;&gt;↑)&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: 16.0016px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 25.6026px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;06&lt;/strong&gt;&amp;nbsp;– &lt;a href=&quot;https://portswigger.net/burp/&quot; target=&quot;_blank&quot;&gt;Burp Suite &lt;/a&gt;(NEW)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;07&lt;/strong&gt;&amp;nbsp;–&amp;nbsp;&lt;a href=&quot;https://www.winitor.com/&quot; target=&quot;_blank&quot;&gt;PeStudio&lt;/a&gt; (-1↓)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;08&lt;/strong&gt;&amp;nbsp;– &lt;a href=&quot;https://nmap.org/&quot; target=&quot;_blank&quot;&gt;Nmap&lt;/a&gt; (+6↑)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;09&lt;/strong&gt;&amp;nbsp;–&amp;nbsp;&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;a href=&quot;https://github.com/haka-security/hak&quot; target=&quot;_blank&quot;&gt;Haka&lt;/a&gt; (NEW)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;10&lt;/strong&gt;&amp;nbsp;– &lt;a href=&quot;https://www.owasp.org/index.php/OWASP_OWTF&quot; target=&quot;_blank&quot;&gt;OWASP Offensive (Web) Testing Framework&lt;/a&gt;&amp;nbsp;(-2↓)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;b&gt;11&lt;/b&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;–&amp;nbsp;&lt;a href=&quot;http://www.tenable.com/products/nessus-vulnerability-scanner&quot; target=&quot;_blank&quot;&gt;NESSUS Vulnerbility Scanner&lt;/a&gt;&amp;nbsp;(+10↓)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;span style=&quot;font-weight: inherit;&quot;&gt;–&lt;a href=&quot;https://www.metasploit.com/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;METASploit Framework (Best so Far)&amp;nbsp;&lt;/a&gt;(+12↓)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;Got some more? &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;; font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;Drop comments! Also let me know which tools you want me to write tutorials about, i will be writing detail tutorials on those tools :)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;; font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;; font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot;; font-size: 16.0016px; line-height: 25.6026px;&quot;&gt;Best&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/5604785976417982062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2016/05/best-linux-security-tools-2016.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/5604785976417982062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/5604785976417982062'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2016/05/best-linux-security-tools-2016.html' title='Best Linux Security Tools 2016'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqh4rWgGkJxSB6UVB272Xq8JbayGtdRfsiw23dFag_2SOvShbCGHyJXGOucAk_Mg18QOo1p90HD6wq1Wu6yN4gLdDNMSIX7kW62gICEfgNVnnSJfWaGcmxMh2LT7jRhgNakkdoHYoIOUk/s72-c/dataprotection2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-8485087826376361034</id><published>2012-10-11T15:18:00.000+05:00</published><updated>2019-06-02T02:52:48.155+05:00</updated><title type='text'>How to Check if a URL is UP?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
So in this small quick tutorial i am going to tell you a very short way to determine weather a website is up or not? We will be using the PHP&#39;s cURL library in order to determine so.&lt;br /&gt;
&lt;br /&gt;
So lets start:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;​function&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;urlUP&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #88ff88; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; font-weight: bold; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;//Validate the URL first!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;filter_var&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;FILTER_VALIDATE_URL&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$handle&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;curl_init&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;urldecode&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;curl_setopt&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;CURLOPT_RETURNTRANSFER&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$response&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;curl_exec&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$httpCode&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;curl_getinfo&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;CURLINFO_HTTP_CODE&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$httpCode&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-atom&quot; style=&quot;color: #228811; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;200&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;amp;&amp;amp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$httpCode&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-atom&quot; style=&quot;color: #228811; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;400&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;return&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-atom&quot; style=&quot;color: #228811; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;return&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-atom&quot; style=&quot;color: #228811; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;curl_close&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #88ff88; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; font-weight: bold; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
This is the function we will be actually using, Lets break it down!&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;We validate the URL through filter_var().&lt;/li&gt;
&lt;li&gt;Open the cURL handle for our URL.&lt;/li&gt;
&lt;li&gt;Set option in cURL to receive the incoming.&lt;/li&gt;
&lt;li&gt;Execute the handle.&lt;/li&gt;
&lt;li&gt;Get the HTTP code response for the executed handle.&lt;/li&gt;
&lt;li&gt;If HTTP Response code is greater than or equal to 200 (200 stands for Ok) or its shorter than 400, this means website is up, return true.&lt;/li&gt;
&lt;li&gt;Else return false,so that means the website is down.&lt;/li&gt;
&lt;li&gt;Close the cURL handle!&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
To use the function you have to do the following:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;if&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;urlUP&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&quot;http://geeks-wiki.blogspot.com&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&quot;The website is currently UP!&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #88ff88; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; font-weight: bold; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&quot;The website is Down!&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #88ff88; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; font-weight: bold; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: &amp;quot;inconsolata&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;consolas&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 15px;&quot;&gt;​&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Use the code freely and leave comments, additionally you can tweak the code as well, or you can also get the HTTP Codes, match them with an array of HTTP Codes and get the specific response as well!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
♥ Happy Coding! ♥&lt;br /&gt;
&lt;br /&gt;
Source:&amp;nbsp;https://www.stackflair.com/curl-error0-in-php/&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/8485087826376361034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/how-to-check-if-url-is-up.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/8485087826376361034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/8485087826376361034'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/how-to-check-if-url-is-up.html' title='How to Check if a URL is UP?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-2732393325016762876</id><published>2012-10-06T23:38:00.001+05:00</published><updated>2012-10-07T00:16:28.463+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="Tricks"/><title type='text'>Best way to Avoid MySQL injection in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL Injection, a commonly method used by majority of hackers and which is the cause for about 70% of the hack&#39;s all over the cyber warfare. Mostly hacker uses this (mysql injection)&amp;nbsp;vulnerability&amp;nbsp;to exploit the website and gain access to the server thus through Admin panel or obtain the sensitive information including Credit Cards etc as well.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0eRBIfRM7bRC992q4cxhkSN5EZpViWp3Sna1luZdlJTv6kNXX_XLVC252dJwgoQvkPUnEGpLijuDwC5QKU8qFxQlu-S1b9qg5aipTk_tse5mS-ZRcf2nnKduRP8Z5zEUsmatTV_wifgc/s1600/injection_blood.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;How to prevent mysql injection in PHP?&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0eRBIfRM7bRC992q4cxhkSN5EZpViWp3Sna1luZdlJTv6kNXX_XLVC252dJwgoQvkPUnEGpLijuDwC5QKU8qFxQlu-S1b9qg5aipTk_tse5mS-ZRcf2nnKduRP8Z5zEUsmatTV_wifgc/s200/injection_blood.png&quot; title=&quot;How to prevent mysql injection in PHP?&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;SQL Injections are Common nowadays!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
So here i am going to explain you the best practices you should do while writing code!&lt;br /&gt;
First of all keep it in mind, never ever trust a user&#39;s input, you are on to your own! So it is the very first thing to keep in mind that whatever a user sends, intentionally or unintentionally, if it is not properly sanitized and exploits a&amp;nbsp;vulnerability&amp;nbsp;which could be possibly a MySQL injection or even a XSS attack, could let hackers give a way to intrude.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Bullet Points:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When you are going to embed strings in HTML for example when you &quot;print&quot; or when you &quot;echo&quot; &amp;nbsp;you should default to escape the string using &lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;htmlspecialchars();&lt;/span&gt;&lt;/b&gt; .&lt;/li&gt;
&lt;li&gt;Never trust user&#39;s input, always sanitize the user input by first sanitizing it properly and before performing any SQL query, this can be achieved by &lt;span style=&quot;color: #444444; font-weight: bold;&quot;&gt;mysql_real_escape_string(&lt;/span&gt;&lt;span style=&quot;color: #783f04; font-weight: bold;&quot;&gt;$parameter&lt;/span&gt;&lt;span style=&quot;color: #444444; font-weight: bold;&quot;&gt;).&lt;/span&gt;Where $parameter is the input you are about to filter.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.php.net/manual/en/security.magicquotes.disabling.php&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Disable Magic Quotes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Use prepared statements and parameterized queries, always filter the user inputs properly,thoroughly and strictly.&lt;/li&gt;
&lt;li&gt;Don&#39;t through &lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;mysql_error()&lt;/span&gt;&lt;/b&gt; to the user,don&#39;t even let them know something happened out there,most of the people use it like, &lt;span style=&quot;color: #444444;&quot;&gt;die(mysql_error()); .&lt;/span&gt;&amp;nbsp;Instead of just throwing this error straight away to the user you can write your custom messages, prepare some log files or even create a &lt;span style=&quot;color: #444444;&quot;&gt;mail()&lt;/span&gt; function so you get notified whenever someone tries to pull something off the routine.&lt;/li&gt;
&lt;li&gt;Log,Log,Log, always log the errors and warning messages, turn off error reporting on live websites and enable only when debugging or during development process or testing phases.&lt;/li&gt;
&lt;li&gt;Be Self-Aware, never give up, always try up-to-date security precautions, create difficult random passwords for database, encrypt all the user&#39;s information in the database and set a value of 666 to the files which contains configuration for mySQL access.&lt;/li&gt;
&lt;li&gt;Keep your server patched and updated, use only latest software&#39;s, if you are on a shared hosting server, and find something which is not fine, notify the Administrator.&lt;/li&gt;
&lt;li&gt;If you are using some&amp;nbsp;software&#39;s&amp;nbsp;like WordPress,Joomla,Drupal or any other free and open-source or even other&amp;nbsp;software&#39;s,keep them updates, most of these products have built-in update notifiers in the Admin panel&#39;s and most of the time they update themselves with a single click.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Best way to Avoid MySQL Injections.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
You basically have two options to achieve this:&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border: 0px; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Using&amp;nbsp;&lt;a href=&quot;http://php.net/manual/en/book.pdo.php&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #4a6b82; cursor: pointer; font-size: 13.63636302947998px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;PDO&lt;/a&gt;:&lt;/div&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$stmt &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $pdo&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;prepare&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;SELECT * FROM employees WHERE name = :name&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

$stmt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;:name&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$stmt &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $row&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: grey; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// do something with $row&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Using&amp;nbsp;&lt;a href=&quot;http://php.net/manual/en/book.mysqli.php&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #4a6b82; cursor: pointer; font-size: 13.63636302947998px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;mysqli&lt;/a&gt;:&lt;/div&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$stmt &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $dbConnection&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;prepare&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;SELECT * FROM employees WHERE name = ?&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
$stmt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bind_param&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;s&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

$stmt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

$result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $stmt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;get_result&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$row &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $result&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fetch_assoc&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;())&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: grey; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// do something with $row&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; font-family: &#39;Trebuchet MS&#39;, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 19.09090805053711px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
PDO&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Note that when using&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;PDO&lt;/code&gt;&amp;nbsp;to access a MySQL database&amp;nbsp;&lt;em style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;real&lt;/em&gt;&amp;nbsp;prepared statements are&amp;nbsp;&lt;strong style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not used by default&lt;/strong&gt;. To fix this you have to disable the emulation of prepared statements. An example of creating a connection using PDO is:&lt;/div&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$dbConnection &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; PDO&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;mysql:dbname=dbtest;host=127.0.0.1;charset=utf8&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;user&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;pass&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

$dbConnection&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ATTR_EMULATE_PREPARES&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
$dbConnection&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ATTR_ERRMODE&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; PDO&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ERRMODE_EXCEPTION&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
In the above example the error mode isn&#39;t strictly necessary,&amp;nbsp;&lt;strong style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;but it is advised to add it&lt;/strong&gt;. This way the script will not stop with a&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;Fatal Error&lt;/code&gt;&amp;nbsp;when something goes wrong. And gives the developer the chance to&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;catch&lt;/code&gt;&amp;nbsp;any error(s) (which are&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;throw&lt;/code&gt;ed as&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;PDOException&lt;/code&gt;s.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
What is&amp;nbsp;&lt;strong style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mandatory&lt;/strong&gt;&amp;nbsp;however is the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;setAttribute()&lt;/code&gt;&amp;nbsp;line, which tells PDO to disable emulated prepared statements and use&amp;nbsp;&lt;em style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;real&lt;/em&gt;&amp;nbsp;prepared statements. This makes sure the statement and the values aren&#39;t parsed by PHP before sending it the the MySQL server (giving a possible attacker no chance to inject malicious SQL).&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Although you can set the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;charset&lt;/code&gt;&amp;nbsp;in the options of the constructor it&#39;s important to note that &#39;older&#39; versions of PHP (&amp;lt; 5.3.6)&amp;nbsp;&lt;a href=&quot;http://php.net/manual/en/ref.pdo-mysql.connection.php&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #4a6b82; cursor: pointer; font-size: 13.63636302947998px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;silently ignored the charset parameter&lt;/a&gt;&amp;nbsp;in the DSN.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; font-family: &#39;Trebuchet MS&#39;, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 19.09090805053711px; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Explanation&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
What happens is that the SQL statement you pass to&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;prepare&lt;/code&gt;&amp;nbsp;is parsed and compiled by the database server. By specifying parameters (either a&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;?&lt;/code&gt;&amp;nbsp;or a named parameter like&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;:name&lt;/code&gt;&amp;nbsp;in the example above) you tell the database engine where you want to filter on. Then when you call&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;execute&lt;/code&gt;&amp;nbsp;the prepared statement is combined with the parameter values you specify.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
The important thing here is that the parameter values are combined with the compiled statement, not a SQL string. SQL injection works by tricking the script into including malicious strings when it creates SQL to send to the database. So by sending the actual SQL separately from the parameters you limit the risk of ending up with something you didn&#39;t intend. Any parameters you send when using a prepared statement will just be treated as strings (although the database engine may do some optimization so parameters may end up as numbers too, of course). In the example above, if the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;$name&lt;/code&gt;&amp;nbsp;variable contains&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&#39;Sarah&#39;; DELETE * FROM employees&lt;/code&gt;&amp;nbsp;the result would simply be a search for the string &quot;&#39;Sarah&#39;; DELETE * FROM employees&quot;, and you will not end up with&amp;nbsp;&lt;a href=&quot;http://xkcd.com/327/&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #4a6b82; cursor: pointer; font-size: 13.63636302947998px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;an empty table&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Another benefit with using prepared statements is that if you execute the same statement many times in the same session it will only be parsed and compiled once, giving you some speed gains.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Oh, and since you asked about how to do it for an insert, here&#39;s an example (using PDO):&lt;/div&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$preparedStatement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $db&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;prepare&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;INSERT INTO table (column) VALUES (:column)&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

$preparedStatement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;:column&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; $unsafeValue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;));&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Any comments are welcome :) Share your practices with me as well.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
♥ Happy Coding ♥&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/2732393325016762876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/best-way-to-avoid-mysql-injection-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/2732393325016762876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/2732393325016762876'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/best-way-to-avoid-mysql-injection-in-php.html' title='Best way to Avoid MySQL injection in PHP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0eRBIfRM7bRC992q4cxhkSN5EZpViWp3Sna1luZdlJTv6kNXX_XLVC252dJwgoQvkPUnEGpLijuDwC5QKU8qFxQlu-S1b9qg5aipTk_tse5mS-ZRcf2nnKduRP8Z5zEUsmatTV_wifgc/s72-c/injection_blood.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-9036860415571874337</id><published>2012-10-06T19:41:00.001+05:00</published><updated>2012-10-06T19:41:10.564+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="URL"/><category scheme="http://www.blogger.com/atom/ns#" term="Validate"/><title type='text'>How to Validate a URL in PHP? [Easy]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Starting from PHP 5.2 we have bunch of built-in functions which makes it easier for programmers to perform small functions without writing up code for them,one of such function is &lt;span style=&quot;color: #666666;&quot;&gt;&lt;b style=&quot;font-size: small;&quot;&gt;filter_var();&amp;nbsp;&lt;/b&gt;&lt;/span&gt;, using filter_var().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfJ5nSKw71z6ogGtWqjvKxhOmeOjQXh1dFbR8KjIGp9HLKE9BFIoxLTlmcXYtzqkBMVLmJkFWfCk7LtvzL2uVYh7LICK-EM15H56X_arIRccW3hYbBzkf3MAB0k84uKk2Fc5aTEUJOrUM/s1600/url.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;How to validate a URL in PHP&quot; border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfJ5nSKw71z6ogGtWqjvKxhOmeOjQXh1dFbR8KjIGp9HLKE9BFIoxLTlmcXYtzqkBMVLmJkFWfCk7LtvzL2uVYh7LICK-EM15H56X_arIRccW3hYbBzkf3MAB0k84uKk2Fc5aTEUJOrUM/s320/url.jpg&quot; title=&quot;How to validate a URL using PHP&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;We can validate emails and URL&#39;s easily with just a few steps or you can say only 4-5 lines of code, so lets say you want to validate a URL using filter_var() you can do it as follow:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;function&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;checkurl&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variabledef&quot; style=&quot;color: blue; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;return&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;filter_var&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-localvariable&quot; style=&quot;color: #004499; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;FILTER_VALIDATE_URL&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;​&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
To use this function simply use the following code :&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;checkurl&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;http://www.google.com&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;URL is correct&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;//continue.... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;URL is incorrect&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;//through an error! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;span class=&quot;whitespace&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot; /&gt;&lt;br /&gt;
Simple isn&#39;t? And if you don&#39;t want to use the complete function,you can simply use the filter_var(&quot;Your URL here!&quot;, FILTER_VALIDATE_URL); .&lt;br /&gt;
&lt;br /&gt;
Comments are welcome, and once more you must have PHP &amp;gt;= 5.2.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
♥ Happy Coding.! ♥&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/9036860415571874337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/how-to-validate-url-in-php-easy.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/9036860415571874337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/9036860415571874337'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/how-to-validate-url-in-php-easy.html' title='How to Validate a URL in PHP? [Easy]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfJ5nSKw71z6ogGtWqjvKxhOmeOjQXh1dFbR8KjIGp9HLKE9BFIoxLTlmcXYtzqkBMVLmJkFWfCk7LtvzL2uVYh7LICK-EM15H56X_arIRccW3hYbBzkf3MAB0k84uKk2Fc5aTEUJOrUM/s72-c/url.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-8424289514325718438</id><published>2012-10-06T19:08:00.002+05:00</published><updated>2012-10-06T19:17:12.029+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="time"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp"/><category scheme="http://www.blogger.com/atom/ns#" term="Tricks"/><title type='text'>PHP Get time difference in Hour,Minutes or Seconds.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Starting from PHP 5.3,it has became so much easy for the programmers to code less and get more because of the in-built classes that came with it.One of from those classes is the DateTime() class which made it lot more easier for using it in many different ways,one of the most required technique from this class is getting the difference of time in Years,months,days,hours or even seconds :).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQP5HnqD6MDfi7sO0qvX1CKrptrAyJFCkt_bBbMzH1tk2aRLdhydUytyJNEM9wXmdWiN8i6trOUK7FI2_Wj1vdaP54SR6QItxsCka7nW-xClOv5oaVj9jlOyAemjMJhX1sQ01iYqzWkho/s1600/Manipulating-with-date-and-time-on-PHP-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;How to get time difference in PHP?&quot; border=&quot;0&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQP5HnqD6MDfi7sO0qvX1CKrptrAyJFCkt_bBbMzH1tk2aRLdhydUytyJNEM9wXmdWiN8i6trOUK7FI2_Wj1vdaP54SR6QItxsCka7nW-xClOv5oaVj9jlOyAemjMJhX1sQ01iYqzWkho/s320/Manipulating-with-date-and-time-on-PHP-3.jpg&quot; title=&quot;How to get time difference in PHP?&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So lets start, we have a scenario that we want to actually get the difference between a past date,suppose a past date you want to compare it with the current date, initiate the class:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$today&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;DateTime&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;&#39;y-m-d h:m:s&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;​&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
First we need to get the today&#39;s time, Year-Month-Date Hour:Minute:Seconds , so in this way we can totally compare the past time and get the actual difference in every possible way :). Next,&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$today&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;diff&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;DateTime&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;&#39;2012-09-11 10:25:00&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;​&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;js-variable&quot;&gt;Next we are going to compare the past time with the current, so using the&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, Andale Mono, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;DateTime()&#39;s&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;method&amp;nbsp;&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, Andale Mono, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 15px;&quot;&gt;diff()&lt;/span&gt;&lt;/span&gt;&amp;nbsp;, since&amp;nbsp;&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt; is a&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;DateInterval&lt;/span&gt; object&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
Now you can get the years,months,days,hours or minutes and vice versa, by the following method:&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot; /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Year(s).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Month(s).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Day(s).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Hour(s).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Minute(s)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;$pastDate&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-comment&quot; style=&quot;color: #aa7700; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px;&quot;&gt;//return the difference in Second(s). ​​​&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
So, now you can actually get the total difference in anyway you want,even in seconds.&lt;br /&gt;
Comments are welcome, hope you have learnt these small tricks,and in a way they are allot more helpful!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
♥ Happy Coding! ♥&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/8424289514325718438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-get-time-difference-in-minutes.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/8424289514325718438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/8424289514325718438'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-get-time-difference-in-minutes.html' title='PHP Get time difference in Hour,Minutes or Seconds.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQP5HnqD6MDfi7sO0qvX1CKrptrAyJFCkt_bBbMzH1tk2aRLdhydUytyJNEM9wXmdWiN8i6trOUK7FI2_Wj1vdaP54SR6QItxsCka7nW-xClOv5oaVj9jlOyAemjMJhX1sQ01iYqzWkho/s72-c/Manipulating-with-date-and-time-on-PHP-3.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-6560237439527007339</id><published>2012-10-04T23:55:00.001+05:00</published><updated>2012-10-04T23:59:06.754+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="COMObjects"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="process"/><title type='text'>PHP Get Process Creation Time.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
So, this is a very quick and dirty method that i am going to tell you today, actually whenever on windows platform if you need to get the time of when is a certain process is created, actually nobody needs it that much only but if you are creating system layered applications with PHP and are going deep inside&amp;nbsp;digging&amp;nbsp;through the WinCOM Objects.&lt;br /&gt;
Anyway, &lt;u&gt;i won&#39;t recommend this method&lt;/u&gt;&amp;nbsp;but may be any of you finds it useful in any scenarios,so here we go:&lt;br /&gt;
&lt;br /&gt;
First of all you need to know, what actually are you trying to achieve,the process in Windows can be accessed using two ways, either by using the PID (Process Identifier) or the name (Image Name). So i will tell you the both ways you can actually get to that by how, here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pid&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;9252&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$wmi&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-keyword&quot; style=&quot;color: #770088; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;COM&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;winmgmts://&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$process&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$wmi&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;ExecQuery&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;SELECT * FROM Win32_Process WHERE ProcessId =&#39;&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-property&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pid&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pDate&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$process&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;CreationDate&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$formatDate&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;date_parse&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pDate&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$time&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$formatDate&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;hour&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;:&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$formatDate&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;minute&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;:&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$formatDate&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&#39;second&#39;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;print&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$time&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;​&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
So, what is actually happening above, its quite simple, i am using COM objects with PHP, even though you should use them with great precautions because they can be huge security risk if exploited so you should have to be really careful playing around with these.&lt;br /&gt;
&lt;br /&gt;
Just change the&amp;nbsp;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pid&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;9252&quot;&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;to any PID you like,and if you want to know the process creation time using its name,than it is quite simple as well, just change the ProcessId with ProcessName in&amp;nbsp;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$wmi&lt;/span&gt;&lt;span class=&quot;js-operator&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;js-variable&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;ExecQuery&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;SELECT * FROM Win32_Process WHERE ProcessId =&#39;&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-property&quot; style=&quot;font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;$pid&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;js-string&quot; style=&quot;color: #aa2222; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;js-punctuation&quot; style=&quot;color: #666666; font-family: Inconsolata, Monaco, Consolas, &#39;Andale Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: 15px; text-align: -webkit-auto;&quot;&gt;; &amp;nbsp;&lt;/span&gt;and you are good to go.&lt;br /&gt;
&lt;br /&gt;
There could be many more methods out but i used this one for my own usage and it quite helped me. But as before i would recommend you to thoroughly tighten the security if you are using COM objects on Enterprise level.&lt;br /&gt;
&lt;br /&gt;
Happy Coding!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/6560237439527007339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-get-process-creation-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/6560237439527007339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/6560237439527007339'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-get-process-creation-time.html' title='PHP Get Process Creation Time.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-7340055817824626592</id><published>2012-10-03T12:52:00.001+05:00</published><updated>2012-10-03T13:23:22.689+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fatal Error Fixes."/><category scheme="http://www.blogger.com/atom/ns#" term="Memory Errors"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Fix PHP FATAL Memory Error, Allowed Maximum Size of X bytes Exhausted... [Solution]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia0XFAI3dSEeUq0wyZDar_F-mvxPbWQ4cVeD6nm2JahEGGL0JlYL0HizUOm27hcwaks33r70TdlzkSAbBBT2ul9TYtPyc_LcRkB2CGEcItW4nyDTeu9U_EQ7BWmdExIbTz8-CqfX2hEzg/s1600/1349251829_error.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;How to fix PHP Fatal Memory Errors!&quot; border=&quot;0&quot; height=&quot;68&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia0XFAI3dSEeUq0wyZDar_F-mvxPbWQ4cVeD6nm2JahEGGL0JlYL0HizUOm27hcwaks33r70TdlzkSAbBBT2ul9TYtPyc_LcRkB2CGEcItW4nyDTeu9U_EQ7BWmdExIbTz8-CqfX2hEzg/s320/1349251829_error.png&quot; title=&quot;Fix PHP Fatal Memory Error, Allowed Maximum size of X bytes exhausted...&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Today while processing PNG images in one of my script, i came across this error:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Consolas, Monaco, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in image.php on line 33.&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
So, i thought may be i need to set the memory to somehow really high, as i am using a fairly decent laptop as my development environment with 8 GB of RAM backed by Core i5 SandyBridge processor, so i didn&#39;t wasted another second and added the following line to the top of my script :&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;ini_set(&quot;memory_limit&quot; , &quot;1024M&quot;);&lt;/span&gt;&lt;/blockquote&gt;
I know this could be insane,but i was a bit in the flow of coding so i didn&#39;t care, amazingly this &lt;span style=&quot;color: #cc0000; font-weight: bold;&quot;&gt;DIDN&#39;T SOLVED THE PROBLEM.&lt;/span&gt;&amp;nbsp;I was totally blank, and i was like, how could this be possible? I mean i know i am processing fairly big enough PNG images which are direct from DSLR but that shouldn&#39;t matter, the same images which are same in resolution but in JPEG are working fine. I thought may be this limit isn&#39;t working through the script, so i corrected the limit in &lt;span style=&quot;color: #b45f06;&quot;&gt;php.ini.&lt;/span&gt;&amp;nbsp;Amazingly, this either didn&#39;t solved the problem itself.&lt;br /&gt;
&lt;br /&gt;
After allot of struggle with this, i just tried to relax myself, and said to myself &quot; I need to do something really tricky here!&quot;.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;So finally i ended up with following line:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #0b5394;&quot;&gt;ini_set(&quot;memory_limit&quot; , &quot;-1&quot;);&lt;/span&gt;&lt;/blockquote&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
To my surprise, this solved the issue&amp;nbsp;instantaneously&amp;nbsp;and my script worked even better, so i thought it may have some draw back issues on my CPU usage, but i monitored the CPU and RAM usage and it didn&#39;t went that up as i expected. But who cares for these things when you actually achieve your goal.&lt;br /&gt;
&lt;br /&gt;
So, what does this actually do? This actually tells PHP to override all the memory limits and use as much memory as possible, this won&#39;t eat that much memory but it will if you use fairly large images, i was actually processing 8MP.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #b45f06;&quot;&gt;Keep in mind that huge memory limits can crush your server, and those scripts which run frequently and poorly coded can be a serious pain in rear for daily uses as they may be slow/sluggish and can even cause server crash as well, so use this with caution, as i am on development platform so i didn&#39;t care about this, but if you are going to use this trick on other platform other than that of development,this might cause you severe problems as well. So code neat, be clear to yourself, avoid unnecessary code blocks and be simple and straight forward for it.&lt;/span&gt;&lt;/blockquote&gt;
At last i would say that, everything you go onto, just give it a try,actually you learn only when you take risks, so its better to try many &amp;nbsp;things, &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Practice makes a man perfect.&quot;.&lt;/span&gt;&lt;br /&gt;
Keep this&amp;nbsp;motto&amp;nbsp;in your mind, be positive for yourself and don&#39;t worry about what might other think about your coding standards because everyone lives for themselves, so do your code. Comments are welcome, let me know your solutions about this.&lt;br /&gt;
&lt;br /&gt;
This isn&#39;t just for image processing but you can use it though at any stage, but first try to allocate the similar sizes of memory like , 32M , 64M, 96M to 256M or even 512M. But make sure to debug your script and know at which stage is it consuming the most of the memory, so you can actually know what is causing it to hog.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;♥&lt;/span&gt; Happy Coding &lt;span style=&quot;color: #cc0000;&quot;&gt;♥&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/7340055817824626592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-fatal-error-allowed-maximum-size-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/7340055817824626592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/7340055817824626592'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-fatal-error-allowed-maximum-size-of.html' title='Fix PHP FATAL Memory Error, Allowed Maximum Size of X bytes Exhausted... [Solution]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia0XFAI3dSEeUq0wyZDar_F-mvxPbWQ4cVeD6nm2JahEGGL0JlYL0HizUOm27hcwaks33r70TdlzkSAbBBT2ul9TYtPyc_LcRkB2CGEcItW4nyDTeu9U_EQ7BWmdExIbTz8-CqfX2hEzg/s72-c/1349251829_error.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8999220862553390592.post-331508810009936674</id><published>2012-10-01T15:16:00.001+05:00</published><updated>2012-10-01T15:16:38.381+05:00</updated><title type='text'>PHP - a Billionaire&#39;s Choice.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://www.php.net/&quot;&gt;PHP&lt;/a&gt;&amp;nbsp;which came into existence 17 years ago, in 1995 when Rasmus Lerdorf created a script from Perl known as &#39;&#39;Personal Homepage Tools&#39;&#39; was not the first to the ground for dynamic scripting.&lt;br /&gt;
&lt;br /&gt;
The programming language took height when PHP 4 was initially released in 2000 and than became a star when PHP 5 was introduced in 2004 followed by the powerful Zend Engine.PHP became the choice for programmers rapidly due to its flexibility in coding and speed of parsing and the choice of extensions which totally boosted PHP&#39;s ground market and somehow defeating the major Competitors, ASP- Active Server Pages, which was the some-how similar to PHP or you can say PHP was similar to ASP but PHP was developed by using a mixture of different tastes of many languages, like Perl and Python to the C.&lt;br /&gt;
&lt;br /&gt;
Many popular companies choose&#39;d PHP, the major example is &lt;a href=&quot;http://www.facebook.com/&quot;&gt;Facebook&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://www.yahoo.com/&quot;&gt;Yahoo!&lt;/a&gt;. Just because of its flexibility and freedom to code.PHP became popular because it was open-source so you can download the source, tweak it according to your needs, remove any bloat stuff, keep the necessary things within and so on.&lt;br /&gt;
&lt;br /&gt;
The cross-platform independent language became so popular that now-a-days its first of the choice by any newbie web designer / developer / programmer, just because its so fun and easy to learn through its every step.&lt;br /&gt;
&lt;br /&gt;
This giant scripting language has the footholds on any operating system,no matter if it is *inx/Windows/Mac , you have the choice, choose Mac and get the PHP-Packages, install it , choose your&amp;nbsp;favorite&amp;nbsp;code editor program and start coding.&lt;br /&gt;
&lt;br /&gt;
Learning PHP is so simple, you have allot of tutors out there who can teach you for free, i mean seriously, every time you face a problem or you need to know &quot;What is this stuff for?&quot; you have a complete bible written over there at www.php.net with full manuals and most of all the comments below every manual helps you understand the basics and advanced techniques as well.&lt;br /&gt;
&lt;br /&gt;
When i first started to learn PHP, i didn&#39;t knew HTML properly, seriously, I don&#39;t! But wait, i went through www.w3schools.com , it was back in 2005. I learned PHP and at that time i was totally new to coding, and i feel no shame in saying so that i am still in a process of learning,but while in the process of learning i came to know allot of things, the most of all is the Linux&#39;s Terminal, Yeah... you read it right, the Linux&#39;s Terminal, i learned allot of commands for it while compiling the PHP&#39;s source under ubuntu and than fedora.&lt;br /&gt;
&lt;br /&gt;
Anyway, i just created this Blog to share everything i have learnt so far, and i hope so that you guys, if any read this, will surely comment about all this :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://geeks-wiki.blogspot.com/feeds/331508810009936674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-billionaires-choice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/331508810009936674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8999220862553390592/posts/default/331508810009936674'/><link rel='alternate' type='text/html' href='http://geeks-wiki.blogspot.com/2012/10/php-billionaires-choice.html' title='PHP - a Billionaire&#39;s Choice.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>