<?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>Large Resource</title>
	<atom:link href="http://www.largeresource.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.largeresource.net</link>
	<description>unlimited blogs and solutions</description>
	<lastBuildDate>Sun, 17 Jul 2011 06:47:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Recursively reading files based on search option in PHP 4 and 5</title>
		<link>http://www.largeresource.net/recursively-reading-files-based-on-search-option-in-php-4-and-5/</link>
		<comments>http://www.largeresource.net/recursively-reading-files-based-on-search-option-in-php-4-and-5/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 06:36:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[reading files]]></category>
		<category><![CDATA[recursive read files]]></category>
		<category><![CDATA[search option]]></category>
		<category><![CDATA[search pattern]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=22</guid>
		<description><![CDATA[Recursively reading files based on search option in PHP 4 and 5. It is a small script written in equivalent to Directory.GetFiles method in C#. Small script to read xml files recursively from a specified directory. Return the results in array format. Same code is written in little different format to make it to work [...]]]></description>
			<content:encoded><![CDATA[<p>Recursively reading files based on search option in PHP 4 and 5. It is a small script written in equivalent to Directory.GetFiles method in C#.</p>
<p><span id="more-22"></span></p>
<p>Small script to read xml files recursively from a specified directory. Return the results in array format. Same code is written in little different format to make it to work in PHP 4 and 5 versions.</p>
<p><strong>PHP 4</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
	$dir_path = '.';
	$files = get_files($dir_path, '.xml', 'r');
	print_r($files); // return all xml files in array format.

	function get_files($dir_path = '.', $searchPattern = '', $searchOption = '') {

		$files = array();

		if (is_dir($dir_path)) {
			if ($handle = opendir($dir_path)) {
				$l_searchPattern = (!empty($searchPattern) &amp;&amp; substr($searchPattern,0,1) == '*') ? '.' . substr($searchPattern,0,1) . preg_quote(substr($searchPattern,1)) : $searchPattern;
				while (($file = readdir($handle)) !== false) {
					if ($file == &quot;.&quot; || $file == &quot;..&quot; ) continue;

					$complete_filepath = $dir_path .'/'. $file;

					if (is_dir($complete_filepath) &amp;&amp; ($searchOption == 'recursive' || $searchOption == 'r')) {
						$files = array_merge($files, get_files($complete_filepath, $searchPattern, $searchOption));
						continue;
					}

					if (!is_dir($complete_filepath) &amp;&amp; empty($l_searchPattern) || preg_match(&quot;/$l_searchPattern$/i&quot;, $file)) {
						array_push($files, $complete_filepath);
					}
				}
				closedir($handle);
			}
		}

		return $files;
	}
?&gt;
</pre>
<p><strong>PHP 5</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

	$dir_path = '.';

	$files = get_files($dir_path, '.xml', 'r');

	print_r($files);

	function get_files($dir_path = '.', $searchPattern = '', $searchOption = '') {

		$files = array();

		if (is_dir($dir_path)) {
			$scan_files = scandir($dir_path);

			$l_searchPattern = (!empty($searchPattern) &amp;&amp; substr($searchPattern,0,1) == '*') ? '.' . substr($searchPattern,0,1) . preg_quote(substr($searchPattern,1)) : $searchPattern;
			foreach($scan_files as $file) {
				if ($file == &quot;.&quot; || $file == &quot;..&quot; ) continue;

				$complete_filepath = $dir_path .'/'. $file;

				if (is_dir($complete_filepath) &amp;&amp; ($searchOption == 'recursive' || $searchOption == 'r')) {
					$files = array_merge($files, get_files($complete_filepath, $searchPattern, $searchOption));
					continue;
				}

				if (!is_dir($complete_filepath) &amp;&amp; empty($l_searchPattern) || preg_match(&quot;/$l_searchPattern$/i&quot;, $file)) {
					array_push($files, $complete_filepath);
				}
			}
		}

		return $files;
	}

?&gt;
</pre>
<p>I have used scandir function in PHP 5 version, which is easiest way to read directories and files from specific directory. To learn more about scandir function &#8211; <a href="http://php.net/manual/en/function.scandir.php">http://php.net/manual/en/function.scandir.php</a>.</p>
<p>In get_files function, there are three parameters<br />
1. $dir_path &#8211; The path you want to read files<br />
2. $searchPattern &#8211; By default it is empty, If you don&#8217;t pass any value, then it will return all files. If you want only xml files then pass &#8220;.xml&#8221; or &#8220;*.xml&#8221;<br />
3. $searchOption &#8211; By default it is empty, If you pass empty it will return files from top directory only. To recursively get files based on searchPattern then pass &#8220;recursive&#8221; or &#8220;r&#8221;.</p>
<p>Thanks for reading <img src='http://www.largeresource.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/recursively-reading-files-based-on-search-option-in-php-4-and-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Detecting URL and Making it as link in Text</title>
		<link>http://www.largeresource.net/detecting-url-and-making-it-as-link-in-text/</link>
		<comments>http://www.largeresource.net/detecting-url-and-making-it-as-link-in-text/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 04:20:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[detecting urls]]></category>
		<category><![CDATA[making link]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=20</guid>
		<description><![CDATA[We might be having large text, with urls without links. Instead of editing the text or post, we can make the url as link dynamically while displaying it in browser. The above code will find the urls in $text and make it as links dynamically. This code can be used in any part of code [...]]]></description>
			<content:encoded><![CDATA[<p>We might be having large text, with urls without links. Instead of editing the text or post, we can make the url as link dynamically while displaying it in browser.</p>
<p><span id="more-20"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$text = 'This is a simple text to find http://www.google.com
and http://www.about.com urls from the text and make it as links
URLs will be dynamically formatted as links, this avoid editing each post or text
in large archives or database - http://www.largeresource.net/ ';
$text = preg_replace( &quot;/(^|\s)((http|https|ftp):\/\/[^\s&lt;]+)/i&quot;, '\\1&lt;a href=&quot;\\2&quot;&gt;\\2&lt;/a&gt;', $text );
echo $text;
?&gt;
</pre>
<p>The above code will find the urls in $text and make it as links dynamically. This code can be used in any part of code structure easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/detecting-url-and-making-it-as-link-in-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moving large file from one server to another server without downloading locally</title>
		<link>http://www.largeresource.net/moving-large-file-from-one-server-to-another-server-without-downloading-locally/</link>
		<comments>http://www.largeresource.net/moving-large-file-from-one-server-to-another-server-without-downloading-locally/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 16:07:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[backup file]]></category>
		<category><![CDATA[moving large file]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=19</guid>
		<description><![CDATA[Here is the simple script to copy large file from one server to another server without downloading it to local machine. Create a download.php in your destination server and change the filename to be downloaded and created. It will avoid user&#8217;s bandwidth and time and it is the easiest way to copy the large backup [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the simple script to copy large file from one server to another server without downloading it to local machine.</p>
<p><span id="more-19"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    $in = fopen(&quot;http://xyz.com/backup.tar.gz&quot;, &quot;rb&quot;);
    $out = fopen(&quot;backup.tar.gz&quot;, &quot;w+&quot;);
    echo pipe_streams($in, $out);

    function pipe_streams($in, $out)
    {
        $size = 0;
        while (!feof($in)) $size += fwrite($out,fread($in,8192));
        return $size;
    }
?&gt;
</pre>
<p>Create a download.php in your destination server and change the filename to be downloaded and created.<br />
It will avoid user&#8217;s bandwidth and time and it is the easiest way to copy the large backup files from one server to another server, while changing the hosting server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/moving-large-file-from-one-server-to-another-server-without-downloading-locally/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Script to Log into an SMTP server &#8211; phpmailer</title>
		<link>http://www.largeresource.net/script-to-log-into-an-smtp-server-phpmailer/</link>
		<comments>http://www.largeresource.net/script-to-log-into-an-smtp-server-phpmailer/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 14:59:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpmailer]]></category>
		<category><![CDATA[SMTP Server]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=17</guid>
		<description><![CDATA[Best way to read and send mails is log into an SMTP server. Download the latest phpmailer source code and copy it into your server. And use the below script to send mails using SMTP server. Finally smtp_auth_mail function will return true after sending the mail successfully otherwise it will return false.]]></description>
			<content:encoded><![CDATA[<p>Best way to read and send mails is log into an SMTP server.</p>
<p><span id="more-17"></span></p>
<p>Download the latest phpmailer source code and copy it into your server.<br />
And use the below script to send mails using SMTP server.</p>
<pre class="brush: php; title: ; notranslate">
require_once(&quot;phpmailer/class.phpmailer.php&quot;);
require_once(&quot;phpmailer/class.smtp.php&quot;);

function smtp_auth_mail($to, $subject, $message, $headers, $auth = true)
{
	$mail             = new PHPMailer();

	$body             = $message;

	$mail-&gt;IsSMTP(); // telling the class to use SMTP
	$mail-&gt;Host       = &quot;localhost&quot;; // SMTP server
	$mail-&gt;Port       = &quot;465&quot;; // SMTP port
	$mail-&gt;SMTPSecure = &quot;ssl&quot;; // SMTP secure

	$mail-&gt;From       = &quot;admin@xyz.com&quot;;
	$mail-&gt;FromName   = &quot;XYZ Admin&quot;;

	if ($auth)
	{
		$mail-&gt;SMTPAuth	  = true;

		$mail-&gt;Username	  = &quot;admin@xyz.com&quot;; // in some servers @ will be replaced with +
		$mail-&gt;Password	  = &quot;xyz123&quot;;
	}

	$mail-&gt;Subject    = $subject;

	$body = str_ireplace(&quot;\n&quot;, &quot;&lt;br&gt;&quot;, $body);

	$mail-&gt;MsgHTML($body);

	$mail-&gt;AddAddress($to);

	if(!$mail-&gt;Send()) {
		if (stripos($mail-&gt;ErrorInfo, 'Data not accepted') === false)
			echo &quot;Mailer Error: &quot; . $mail-&gt;ErrorInfo;
			return false;
	} else {
	  return true;
	}
}

smtp_auth_mail('xyz@gmail.com', 'Test mail', 'Test mail from XYZ', '');
</pre>
<p>Finally smtp_auth_mail function will return true after sending the mail successfully otherwise it will return false.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/script-to-log-into-an-smtp-server-phpmailer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to get the current url in PHP?</title>
		<link>http://www.largeresource.net/how-to-get-the-current-url-in-php/</link>
		<comments>http://www.largeresource.net/how-to-get-the-current-url-in-php/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 07:27:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[get current url]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=14</guid>
		<description><![CDATA[Here is simple code to get the current url in PHP You can get the complete URL by using the below code. Found this little snippet that does almost the same&#8230;]]></description>
			<content:encoded><![CDATA[<p>Here is simple code to get the current url in PHP<br />
<span id="more-14"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

	function selfURL() {
		if(!isset($_SERVER['REQUEST_URI'])) {
			$serverrequri = $_SERVER['PHP_SELF'];
		}
		else {
			$serverrequri = $_SERVER['REQUEST_URI'];
		}
		$s = empty($_SERVER[&quot;HTTPS&quot;]) ? '' : ($_SERVER[&quot;HTTPS&quot;] == &quot;on&quot;) ? &quot;s&quot; : &quot;&quot;;
		$protocol = substr(strtolower($_SERVER[&quot;SERVER_PROTOCOL&quot;]), 0, strpos($_SERVER[&quot;SERVER_PROTOCOL&quot;], '/')).$s;
		$port = ($_SERVER[&quot;SERVER_PORT&quot;] == &quot;80&quot;) ? &quot;&quot; : (&quot;:&quot;.$_SERVER[&quot;SERVER_PORT&quot;]);
		return $protocol.&quot;://&quot;.$_SERVER['SERVER_NAME'].$port.$serverrequri;
	}
?&gt;
</pre>
<p>You can get the complete URL by using the below code.</p>
<pre class="brush: php; title: ; notranslate"> &lt;?php echo selfURL(); ?&gt; </pre>
<p>Found this <a href="http://dev.kanngard.net/Permalinks/ID_20050507183447.html">little snippet</a> that does almost the same&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/how-to-get-the-current-url-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL statement to find modified stored procedures in SQL Server Database</title>
		<link>http://www.largeresource.net/sql-statement-to-find-modified-stored-procedures-in-sql-server-database/</link>
		<comments>http://www.largeresource.net/sql-statement-to-find-modified-stored-procedures-in-sql-server-database/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 08:32:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[stored procedures]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=12</guid>
		<description><![CDATA[Most of the time we need to copy the stored procedures from development to production database server. That time we need to find out list of stored procedures modified. Here is the simple sql query to order the stored procedures modified. To find stored procedures modified after specified date To find stored procedures modified in [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time we need to copy the stored procedures from development to production database server. That time we need to find out list of stored procedures modified. Here is the simple sql query to order the stored procedures modified.<br />
<span id="more-12"></span></p>
<pre class="brush: sql; title: ; notranslate">select name, create_date, modify_date from sys.objects where type='P' order by modify_date desc</pre>
<p>To find stored procedures modified after specified date</p>
<pre class="brush: sql; title: ; notranslate">select name, create_date, modify_date from sys.objects where type='P' and modify_date &gt; '2010-05-26 12:10:44.810' order by modify_date desc</pre>
<p>To find stored procedures modified in last 15 days</p>
<pre class="brush: sql; title: ; notranslate">select name, create_date, modify_date from sys.objects where type='P' and datediff(day, modify_date, getdate()) &lt;= 15 order by modify_date desc</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/sql-statement-to-find-modified-stored-procedures-in-sql-server-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quickly retrieving HTTP response status code of URL using HEAD method in PHP</title>
		<link>http://www.largeresource.net/quickly-retrieving-http-response-status-code-of-url-using-head-method-in-php/</link>
		<comments>http://www.largeresource.net/quickly-retrieving-http-response-status-code-of-url-using-head-method-in-php/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 14:35:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[complete url]]></category>
		<category><![CDATA[HEAD method]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[response code]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=11</guid>
		<description><![CDATA[Here is simple to retrieve the HTTP response status code of URL using HEAD method in PHP. The above php code, parse the querystring complete url, makes socket connection, pass the head method in headers and finally prints the response code and status. Here is the example how to pass the complete url to above [...]]]></description>
			<content:encoded><![CDATA[<p>Here is simple to retrieve the HTTP response status code of URL using HEAD method in PHP.<br />
<span id="more-11"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

$parseurl = parse_url($_GET[&quot;url&quot;]);

$service_port = getservbyname('www', 'tcp');

$address = gethostbyname($parseurl[&quot;host&quot;]);

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket &lt; 0) {
    echo &quot;socket_create() failed: reason: &quot; . socket_strerror($socket) . &quot;\n&quot;;
}

$result = socket_connect($socket, $address, $service_port);
if ($result &lt; 0) {
    echo &quot;socket_connect() failed.\nReason: ($result) &quot; . socket_strerror($result) . &quot;\n&quot;;
}

$in = &quot;HEAD &quot; . $parseurl[&quot;path&quot;] . &quot; HTTP/1.1\r\n&quot;;
$in .= &quot;Host: &quot; . $parseurl[&quot;host&quot;] . &quot;\r\n&quot;;
$in .= &quot;Connection: Close\r\n\r\n&quot;;
$out = '';

socket_write($socket, $in, strlen($in));

if ($out = socket_read($socket, 2048)) {
    $response = explode(&quot;\n&quot;, $out);
    $response_status = explode(&quot; &quot;, $response[0]);
    $response_string = $response_status[1] . &quot; &quot; . $response_status[2];
    echo $response_string; // prints response code and status
}

socket_close($socket);
?&gt;
</pre>
<p>The above php code, parse the querystring complete url, makes socket connection, pass the head method in headers and finally prints the response code and status.</p>
<p>Here is the example how to pass the complete url to above php code.</p>
<pre class="brush: plain; title: ; notranslate">http.php?url=http://www.google.com/</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/quickly-retrieving-http-response-status-code-of-url-using-head-method-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep x latest files and delete remaining files from particular directory</title>
		<link>http://www.largeresource.net/keep-x-latest-files-and-delete-remaining-files-from-particular-directory/</link>
		<comments>http://www.largeresource.net/keep-x-latest-files-and-delete-remaining-files-from-particular-directory/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 01:37:22 +0000</pubDate>
		<dc:creator>varung</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[delete old files]]></category>
		<category><![CDATA[filemtime]]></category>
		<category><![CDATA[keep latest files]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=9</guid>
		<description><![CDATA[Here is the useful code in PHP to keep x latest files and delete remaining files from particular directory The above function will loop through the specified folder and add file with file modified time as key and filename as value. Then it will sort the array based on key and finally it will leave [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the useful code in PHP to keep x latest files and delete remaining files from particular directory<br />
<span id="more-9"></span></p>
<pre class="brush: php; title: ; notranslate">
	function delete_old_files($folder_name, $no_latest_files = 10)
	{
		$file_list = array();
		if ($handle = opendir($folder_name)) {
			while (false !== ($file = readdir($handle))) {
				if ($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot;) {
					$file_list[filemtime($folder_name.&quot;/&quot;.$file)] = $folder_name.&quot;/&quot;.$file;
				}
			}
			closedir($handle);
		}

		krsort($file_list);

		$i = 0;
		foreach($file_list as $key =&gt; $value)
		{
			$i++;
			if ($i &lt;= $no_latest_files) continue;
			unlink($value);
		}
	}
</pre>
<p>The above function will loop through the specified folder and add file with file modified time as key and filename as value.<br />
Then it will sort the array based on key and finally it will leave x no. of latest files and delete remaining files in the specified directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/keep-x-latest-files-and-delete-remaining-files-from-particular-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying timer from server time instead of using client side time in Javascript</title>
		<link>http://www.largeresource.net/displaying-timer-from-server-time-instead-of-using-client-side-time-in-javascript/</link>
		<comments>http://www.largeresource.net/displaying-timer-from-server-time-instead-of-using-client-side-time-in-javascript/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 14:01:05 +0000</pubDate>
		<dc:creator>poster</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[client-side]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[server-side]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=6</guid>
		<description><![CDATA[Here is the useful Javascript function, which retrieves the Server Date Time from PHP and stores into Javascript variable. Finally runs the timer in Javascript.]]></description>
			<content:encoded><![CDATA[<p>Here is the useful Javascript function, which retrieves the Server Date Time from PHP and stores into Javascript variable. Finally runs the timer in Javascript.<br />
<span id="more-6"></span></p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;

var currenttime = '&lt;? echo date(&quot;F d, Y H:i:s&quot;, time())?&gt;' //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var montharray= new Array(&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;, &quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;);
var serverdate=new Date(currenttime);

function padlength(what){
	var output=(what.toString().length==1)? &quot;0&quot;+what : what;
	return output;
}

function displaytime(){
	serverdate.setSeconds(serverdate.getSeconds()+1);
	var datestring=montharray[serverdate.getMonth()]+&quot; &quot;+padlength(serverdate.getDate())+&quot;, &quot;+serverdate.getFullYear();
	var timestring = padlength(serverdate.getHours())+&quot;:&quot;+padlength(serverdate.getMinutes())+ &quot;:&quot; + padlength(serverdate.getSeconds());
	document.getElementById(&quot;clock&quot;).innerHTML = datestring + &quot; &quot; + timestring;
}

setInterval(&quot;displaytime()&quot;, 1000);

&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/displaying-timer-from-server-time-instead-of-using-client-side-time-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finding image url is valid or not in PHP</title>
		<link>http://www.largeresource.net/finding-image-url-is-valid-or-not-in-php/</link>
		<comments>http://www.largeresource.net/finding-image-url-is-valid-or-not-in-php/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 04:01:26 +0000</pubDate>
		<dc:creator>poster</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[getimagesize]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[valid]]></category>

		<guid isPermaLink="false">http://www.largeresource.net/?p=3</guid>
		<description><![CDATA[Here is the very useful function to find image url is valid or not in PHP The above function will return true, if the image url is valid otherwise false.]]></description>
			<content:encoded><![CDATA[<p>Here is the very useful function to find image url is valid or not in PHP<br />
<span id="more-3"></span></p>
<pre class="brush: php; title: ; notranslate">
  	function is_valid_image_url($image_url)
  	{
  		$size = getimagesize($image_url);
  		if(!is_array($size))
  		{
  			return false;
  		}

  		return true;
  	}
</pre>
<p>The above function will return true, if the image url is valid otherwise false.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.largeresource.net/finding-image-url-is-valid-or-not-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

