<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Php Snippets Archives - BinaryTides</title>
	<atom:link href="https://www.binarytides.com/category/programming/php-tutorials/php-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/category/programming/php-tutorials/php-snippets/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Sat, 02 Sep 2023 02:48:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Php &#8211; Fix &#8220;Input is not proper UTF-8, indicate encoding&#8221; error when loading xml</title>
		<link>https://www.binarytides.com/php-fix-input-is-not-proper-utf-8-indicate-encoding-error-when-loading-xml/</link>
					<comments>https://www.binarytides.com/php-fix-input-is-not-proper-utf-8-indicate-encoding-error-when-loading-xml/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 26 Mar 2013 05:25:22 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4352</guid>

					<description><![CDATA[<p>When loading xml files in php through simplexml_load_string or domDocument class, sometimes an error like this might popup Warning: DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding ! OR Warning: simplexml_load_string(): Entity: line 93: parser error : Input is not proper UTF-8, indicate encoding ! The error occurs when the xml has some invalid characters... <span class="read-more"><a href="https://www.binarytides.com/php-fix-input-is-not-proper-utf-8-indicate-encoding-error-when-loading-xml/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-fix-input-is-not-proper-utf-8-indicate-encoding-error-when-loading-xml/">Php &#8211; Fix &#8220;Input is not proper UTF-8, indicate encoding&#8221; error when loading xml</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-fix-input-is-not-proper-utf-8-indicate-encoding-error-when-loading-xml/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>Php &#8211; How to fetch gzipped content over HTTP with file_get_contents</title>
		<link>https://www.binarytides.com/php-fetch-gzipped-content-over-http-with-file_get_contents/</link>
					<comments>https://www.binarytides.com/php-fetch-gzipped-content-over-http-with-file_get_contents/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sun, 24 Mar 2013 11:28:57 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4312</guid>

					<description><![CDATA[<p>The file_get_contents function is often used to quickly fetch a http url or resource. Usage is very simple and appears like this $content = file_get_contents(&#039;http://www.google.com/&#039;); However the file_get_contents does not get the contents compressed. It requests the server to send everything in plain text format. Most websites are capable of serving compressed content, if they... <span class="read-more"><a href="https://www.binarytides.com/php-fetch-gzipped-content-over-http-with-file_get_contents/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-fetch-gzipped-content-over-http-with-file_get_contents/">Php &#8211; How to fetch gzipped content over HTTP with file_get_contents</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-fetch-gzipped-content-over-http-with-file_get_contents/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Validate domain name using filter_var function in php</title>
		<link>https://www.binarytides.com/validate-domain-name-filter_var-function-php/</link>
					<comments>https://www.binarytides.com/validate-domain-name-filter_var-function-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 21 Mar 2013 12:24:11 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php snippets]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4280</guid>

					<description><![CDATA[<p>The filter_var function of php is capable of validating many things like emails, urls, ip addresses etc. It does not have a direct option to validate a domain name however. So I coded up this little snippet that the filter_var function with a little tweak so that it can validate domain names as well. function... <span class="read-more"><a href="https://www.binarytides.com/validate-domain-name-filter_var-function-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/validate-domain-name-filter_var-function-php/">Validate domain name using filter_var function in php</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/validate-domain-name-filter_var-function-php/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>How to download a file using Curl in PHP &#8211; Code Snippet</title>
		<link>https://www.binarytides.com/download-a-file-using-curl-in-php/</link>
					<comments>https://www.binarytides.com/download-a-file-using-curl-in-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 19 Mar 2013 12:08:03 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php snippets]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4276</guid>

					<description><![CDATA[<p>Download a File using Curl Here is a quick curl snippet for php, that can download a remote file and save it. &#60;?php set_time_limit(0); // File to save the contents to $fp = fopen (&#039;files2.tar&#039;, &#039;w+&#039;); $url = &#34;http://localhost/files.tar&#34;; // Here is the file we are downloading, replace spaces with %20 $ch = curl_init(str_replace(&#34; &#34;,&#34;%20&#34;,$url));... <span class="read-more"><a href="https://www.binarytides.com/download-a-file-using-curl-in-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/download-a-file-using-curl-in-php/">How to download a file using Curl in PHP &#8211; Code Snippet</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/download-a-file-using-curl-in-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to compress images in Php using GD Library</title>
		<link>https://www.binarytides.com/compress-images-php-using-gd/</link>
					<comments>https://www.binarytides.com/compress-images-php-using-gd/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 12 Mar 2013 11:17:49 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4249</guid>

					<description><![CDATA[<p>Php applications might need to do some image processing if they are allowing users to upload pictures of somekind. This can include cropping, watermarking, compressing etc. To compress an image the quality needs to be adjusted. Here is a code example of how to do it: function compress_image($src, $dest , $quality) { $info = getimagesize($src);... <span class="read-more"><a href="https://www.binarytides.com/compress-images-php-using-gd/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/compress-images-php-using-gd/">How to compress images in Php using GD Library</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/compress-images-php-using-gd/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to extract tar.gz archives in Php</title>
		<link>https://www.binarytides.com/extract-tar-gz-archives-php/</link>
					<comments>https://www.binarytides.com/extract-tar-gz-archives-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 12 Mar 2013 10:52:28 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4243</guid>

					<description><![CDATA[<p>In a previous article we learned how to . Now lets do the reverse, that is extract tar.gz archives and get the files out. The code to extract a tar.gz archive is very simple and uses PharData class. Here is an example // decompress from gz $p = new PharData(&#039;files.tar.gz&#039;); $p-&#62;decompress(); // creates files.tar //... <span class="read-more"><a href="https://www.binarytides.com/extract-tar-gz-archives-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/extract-tar-gz-archives-php/">How to extract tar.gz archives in Php</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/extract-tar-gz-archives-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create tar archives in Php with PharData</title>
		<link>https://www.binarytides.com/how-to-create-tar-archives-in-php/</link>
					<comments>https://www.binarytides.com/how-to-create-tar-archives-in-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 16:04:47 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<guid isPermaLink="false">http://www.codekites.com/?p=4228</guid>

					<description><![CDATA[<p>Tar is a common archive format used on linux. Alone it is just an archiving format, that is it can only pack multiple files together but not compress them. When combined with gzip or bzip2 files are compressed as well. Then it becomes a .tar.gz which is actually a gzip compressed tar file. Php has... <span class="read-more"><a href="https://www.binarytides.com/how-to-create-tar-archives-in-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/how-to-create-tar-archives-in-php/">How to Create tar archives in Php with PharData</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/how-to-create-tar-archives-in-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Generate a dropdown list of timezones in php</title>
		<link>https://www.binarytides.com/dropdown-list-timezones-php/</link>
					<comments>https://www.binarytides.com/dropdown-list-timezones-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 22 Nov 2012 14:23:31 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/?p=3736</guid>

					<description><![CDATA[<p>Applications often allow users to select their timezones for reporting the proper time properly. Here is a quick function that can be used to generate a dropdown list of timezones that is easy to read and understand. &#38;lt;?php function get_timezones() { $o = array(); $t_zones = timezone_identifiers_list(); foreach($t_zones as $a) { $t = &#039;&#039;; try... <span class="read-more"><a href="https://www.binarytides.com/dropdown-list-timezones-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/dropdown-list-timezones-php/">Generate a dropdown list of timezones in php</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/dropdown-list-timezones-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Php array of iso 639-1 language codes and names</title>
		<link>https://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/</link>
					<comments>https://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 22 Nov 2012 13:14:01 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php code snippets]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/?p=3732</guid>

					<description><![CDATA[<p>Here is a php array containing the language codes and language names as specified by the iso 639-1 standard. Useful when . &#60;?php /** ISO 639-1 Language Codes Useful in Locale analysis References : 1. http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes 2. http://blog.xoundboy.com/?p=235 */ $language_codes = array( &#039;en&#039; =&#62; &#039;English&#039; , &#039;aa&#039; =&#62; &#039;Afar&#039; , &#039;ab&#039; =&#62; &#039;Abkhazian&#039; , &#039;af&#039;... <span class="read-more"><a href="https://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/">Php array of iso 639-1 language codes and names</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Fill text templates using arrays in php</title>
		<link>https://www.binarytides.com/fill-text-templates-using-arrays-in-php/</link>
					<comments>https://www.binarytides.com/fill-text-templates-using-arrays-in-php/#respond</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sat, 22 Sep 2012 12:12:35 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/?p=3047</guid>

					<description><![CDATA[<p>Text templates are often used to generate content like notification emails, invoices filled with the details of a customer or user. The best example would be a bulk email program that sends out emails to multiple users filling the details of the particular user in every individual mail. Text templates have place holders for fields... <span class="read-more"><a href="https://www.binarytides.com/fill-text-templates-using-arrays-in-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/fill-text-templates-using-arrays-in-php/">Fill text templates using arrays in php</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/fill-text-templates-using-arrays-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Php &#8211; Extract name and value of all input tags with DomDocument</title>
		<link>https://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/</link>
					<comments>https://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sat, 04 Aug 2012 10:27:22 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2386</guid>

					<description><![CDATA[<p>The DomDocument class in php can be used to parse html/xml content and build objects that can be queried using standard functions to extract values. The following functions are quite useful: getElementsByTagName - Get all elements under a node that match a tagname getNamedItem - Get element with a particular "name=" attribute. Useful to find... <span class="read-more"><a href="https://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/">Php &#8211; Extract name and value of all input tags with DomDocument</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-get-name-and-value-of-all-input-tags-on-a-page-with-domdocument/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Php : Get links on a page with DomDocument</title>
		<link>https://www.binarytides.com/php-get-links-on-a-page-with-domdocument/</link>
					<comments>https://www.binarytides.com/php-get-links-on-a-page-with-domdocument/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sat, 04 Aug 2012 10:24:13 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2382</guid>

					<description><![CDATA[<p>Scraper scripts often need to extract all links on a given page. This can be done in a number of ways like regex, domdocument etc. Here is simple code snippet to do this using domdocument. /* Function to get all links on a certain url using the DomDocument */ function get_links($link) { //return array $ret... <span class="read-more"><a href="https://www.binarytides.com/php-get-links-on-a-page-with-domdocument/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-get-links-on-a-page-with-domdocument/">Php : Get links on a page with DomDocument</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-get-links-on-a-page-with-domdocument/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Php function to add st, nd, rd, th to the end of numbers</title>
		<link>https://www.binarytides.com/php-function-to-add-st-nd-rd-th-to-the-end-of-numbers/</link>
					<comments>https://www.binarytides.com/php-function-to-add-st-nd-rd-th-to-the-end-of-numbers/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sat, 04 Aug 2012 10:20:20 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php code snippets]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2378</guid>

					<description><![CDATA[<p>Often numbers are to be written with a proper suffix, like 1st, 2nd, 3rd, 15th, 21st and so on. So here is a quick function to do the same for a number. Technique 1 /* This function will add st, nd, rd, th to the end of numbers */ function ordinal($i) { $l = substr($i,-1);... <span class="read-more"><a href="https://www.binarytides.com/php-function-to-add-st-nd-rd-th-to-the-end-of-numbers/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-function-to-add-st-nd-rd-th-to-the-end-of-numbers/">Php function to add st, nd, rd, th to the end of numbers</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-function-to-add-st-nd-rd-th-to-the-end-of-numbers/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Execute shell commands in PHP</title>
		<link>https://www.binarytides.com/execute-shell-commands-php/</link>
					<comments>https://www.binarytides.com/execute-shell-commands-php/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 27 Mar 2012 08:36:59 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1535</guid>

					<description><![CDATA[<p>Like any other language php applications often need to execute system commands like they are run from the terminal/console/commandline. Php has multiple functions to do this task. Lets take a look at each of these 1. system "system() is just like the C version of the function in that it executes the given command and... <span class="read-more"><a href="https://www.binarytides.com/execute-shell-commands-php/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/execute-shell-commands-php/">Execute shell commands in PHP</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/execute-shell-commands-php/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>PHP best way to check if file is an image</title>
		<link>https://www.binarytides.com/php-check-if-file-is-an-image/</link>
					<comments>https://www.binarytides.com/php-check-if-file-is-an-image/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sun, 23 Oct 2011 10:22:09 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=588</guid>

					<description><![CDATA[<p>The getimagesize function of php provides lot of information about an image file , including its type. The type can be used to check if the file is a valid image file or not. To check if a file is an image or not, use the function function is_image($path) { $a = getimagesize($path); $image_type =... <span class="read-more"><a href="https://www.binarytides.com/php-check-if-file-is-an-image/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-check-if-file-is-an-image/">PHP best way to check if file is an image</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-check-if-file-is-an-image/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>PHP create nested directories for a given path</title>
		<link>https://www.binarytides.com/php-create-nested-directories-for-a-given-path/</link>
					<comments>https://www.binarytides.com/php-create-nested-directories-for-a-given-path/#respond</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sat, 22 Oct 2011 09:31:41 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=555</guid>

					<description><![CDATA[<p>If a file is to be saved in at path /var/www/a/b/c/d/abc.zip where the directory c and d dont exist then the directories have to created. Here is a function that uses recursion to check for directories in a path and create them if they do not exist : /** Make a nested path , creating... <span class="read-more"><a href="https://www.binarytides.com/php-create-nested-directories-for-a-given-path/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-create-nested-directories-for-a-given-path/">PHP create nested directories for a given path</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-create-nested-directories-for-a-given-path/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP redirect &#8211; go back to previous page</title>
		<link>https://www.binarytides.com/php-redirect-go-back-to-previous-page/</link>
					<comments>https://www.binarytides.com/php-redirect-go-back-to-previous-page/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 01 Jul 2009 05:56:54 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=127</guid>

					<description><![CDATA[<p>To go back to the previous page the superglobal variable $_SERVER can be used. $_SERVER['HTTP_REFERER'] has the link to the previous page. So to redirect simply : // Method to go to previous page function goback() { header(&#34;Location: {$_SERVER[&#039;HTTP_REFERER&#039;]}&#34;); exit; } goback();</p>
<p>The post <a href="https://www.binarytides.com/php-redirect-go-back-to-previous-page/">PHP redirect &#8211; go back to previous page</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-redirect-go-back-to-previous-page/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Format numbers to Indian Numerical System</title>
		<link>https://www.binarytides.com/php-format-numbers-to-indian-numerical-system/</link>
					<comments>https://www.binarytides.com/php-format-numbers-to-indian-numerical-system/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 01 Jul 2009 05:50:35 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php code snippets]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=124</guid>

					<description><![CDATA[<p>The numerical system used in India differs from the Western system in terms of the placement of the thousands separator. Example : Number -&#62; 1000000 Indian System -&#62; 10,00,000 (Ten Lakh) Western System -&#62; 1,000,000 (1 Million) While echoing numbers in PHP it is possible to format numbers with such separators using functions like number_format.... <span class="read-more"><a href="https://www.binarytides.com/php-format-numbers-to-indian-numerical-system/">Read More &#187;</a></span></p>
<p>The post <a href="https://www.binarytides.com/php-format-numbers-to-indian-numerical-system/">PHP Format numbers to Indian Numerical System</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-format-numbers-to-indian-numerical-system/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Php &#8211; parse text and convert urls into hyperlinks</title>
		<link>https://www.binarytides.com/php-convert-urls-to-hyperlinks/</link>
					<comments>https://www.binarytides.com/php-convert-urls-to-hyperlinks/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 28 Apr 2009 17:00:00 +0000</pubDate>
				<category><![CDATA[Php Snippets]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php code snippets]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=50</guid>

					<description><![CDATA[<p>The following function will parse a given text and convert all the urls into links. It does this using regular expressions. It converts email addresses to mailto links as well. Code function parse_links($str) { $str = str_replace(&#039;www.&#039;, &#039;http://www.&#039;, $str); $str = preg_replace(&#039;&#124;http://([a-zA-Z0-9-./]+)&#124;&#039;, &#039;&#38;lt;a href=&#38;quot;http://$1&#38;quot;&#38;gt;$1&#38;lt;/a&#38;gt;&#039;, $str); $str = preg_replace(&#039;/(([a-z0-9+_-]+)(.[a-z0-9+_-]+)*@([a-z0-9-]+.)+[a-z]{2,6})/&#039;, &#039;&#38;lt;a href=&#38;quot;mailto:$1&#38;quot;&#38;gt;$1&#38;lt;/a&#38;gt;&#039;, $str); return $str; }</p>
<p>The post <a href="https://www.binarytides.com/php-convert-urls-to-hyperlinks/">Php &#8211; parse text and convert urls into hyperlinks</a> appeared first on <a href="https://www.binarytides.com">BinaryTides</a>.</p>
]]></description>
		
					<wfw:commentRss>https://www.binarytides.com/php-convert-urls-to-hyperlinks/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
