<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2723064088198962914</id><updated>2012-01-31T19:05:56.004+05:30</updated><category term='MYSQL'/><category term='Internet'/><category term='RDF'/><category term='plugin install'/><category term='AJAX'/><category term='CI'/><category term='Perl'/><category term='JS'/><category term='Wallpapers'/><category term='MISC'/><category term='PHP'/><category term='timestump'/><category term='Drupal'/><category term='PostgreSQL'/><category term='MYSQL:DATE'/><category term='General'/><category term='time differance'/><category term='Iframe Popup'/><category term='Linux'/><category term='strtotime'/><category term='Google API'/><category term='Flex'/><category term='symfony'/><category term='Apache'/><category term='Jquery'/><category term='Paypal'/><category term='plugins'/><category term='Facebook'/><category term='Cakephp'/><title type='text'>Faruq Codes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default?start-index=101&amp;max-results=100'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>143</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-134042444772612147</id><published>2011-12-28T21:20:00.002+05:30</published><updated>2011-12-28T23:06:06.053+05:30</updated><title type='text'>You probably tried to upload too large file – phpmyadmin</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here are the solutions to solve the problem:&lt;br /&gt;&lt;br /&gt;1. Increase the values for&amp;nbsp;&lt;span class="pBody postableBody"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;upload_max_filesize, memory_limit and post_max_size&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;directories in php.ini as per requirements and restart the server&lt;br /&gt;&lt;br /&gt;2. You can upload large sql files by changing some configuration settings in C:\xampp\phpmyadmin\config.inc.php file.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Open the config.inc.php file and look for&amp;nbsp;$cfg['UploadDir'] and update it as&amp;nbsp;$cfg['UploadDir'] = "upload". If you dont find just open a config.sample.inc.php and copy that line and paste into your actuall config.inc.php file and update as i mentioned above. Finally it will be:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;$cfg['UploadDir'] = "upload"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Save the file and create upload folder under phpmyadmin folder.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;C:\xampp\apps\phpmyadmin\upload\&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then copy your all .sql files into this folder.&lt;br /&gt;&lt;br /&gt;Now when you go to phpmyadmin import page you will see&amp;nbsp; a drop down with list of .sql files below the browse button.&lt;br /&gt;&lt;br /&gt;You can now select this and begin the import.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;b&gt;If your having problem in Windows 7 and &amp;nbsp;32 bit system you need verify that your values should be under&amp;nbsp;2048M, then only it will work.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reason:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;"The largest signed integer for a 32bit operating system is -2,147,483,647 - 2,147,483,647 since 2048M = 2147483648 bytes, it was going higher than it could calculate, so it was defaulting to a negative integer. Hence the reason why the log file states -2147483648 bytes."&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;If you get&lt;b&gt;&amp;nbsp;&lt;span style="color: red;"&gt;Script timeout passed, if you want to finish import, please resubmit same file and import will resume.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;add&amp;nbsp;&lt;code class="variable"&gt;$cfg&lt;/code&gt;&lt;code class="plain"&gt;[&lt;/code&gt;&lt;code class="string"&gt;'ExecTimeLimit'&lt;/code&gt;&lt;code class="plain"&gt;] = 0; this line in config.inc.php file.&lt;/code&gt;&lt;br /&gt;&lt;code class="plain"&gt;By default&amp;nbsp;setting for ExecTimeLimit is 300 seconds.&lt;/code&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-134042444772612147?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/134042444772612147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/12/you-probably-tried-to-upload-too-large.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/134042444772612147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/134042444772612147'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/12/you-probably-tried-to-upload-too-large.html' title='You probably tried to upload too large file – phpmyadmin'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1454816778331332407</id><published>2011-10-03T21:13:00.004+05:30</published><updated>2011-10-03T21:14:49.438+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Strip only given Tags PHP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;/**&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;* @param String $str&lt;br /&gt;&amp;nbsp;* @param tags which needs to be strip $tags&lt;br /&gt;&amp;nbsp;* @param boolean $stripContent&lt;br /&gt;&amp;nbsp;* @return string&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;function strip_only_tags($str, $tags, $stripContent=false) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $content = '';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!is_array($tags)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $tags = (strpos($str, '&amp;gt;') !== false ? explode('&amp;gt;', str_replace('&amp;lt;', '', $tags)) : array($tags));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(end($tags) == '') array_pop($tags);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($tags as $tag) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($stripContent)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $content = '(.+&amp;lt;/'.$tag.'(&amp;gt;|\s[^&amp;gt;]*&amp;gt;)|)';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $str = preg_replace('#&amp;lt;/?'.$tag.'(&amp;gt;|\s[^&amp;gt;]*&amp;gt;)'.$content.'#is', '', $str);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $str;&lt;br /&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1454816778331332407?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1454816778331332407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/10/strip-only-tags-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1454816778331332407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1454816778331332407'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/10/strip-only-tags-php.html' title='Strip only given Tags PHP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4907369867959343154</id><published>2011-10-03T21:11:00.002+05:30</published><updated>2011-10-03T21:13:00.869+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Remove array Element based on key value PHP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;/**&lt;br /&gt;&amp;nbsp;* Remove array Element based on key value&lt;br /&gt;&amp;nbsp;* @param $arr&lt;br /&gt;&amp;nbsp;* @param $key&lt;br /&gt;&amp;nbsp;* @return array&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;function array_pop_by_key($arr, $key) { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $array_keys = array_keys($arr);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($arr as $array_key =&amp;gt; $value) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($array_key == $key) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; unset($arr[$key]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $arr;&lt;br /&gt;&lt;br /&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4907369867959343154?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4907369867959343154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/10/remove-array-element-based-on-key-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4907369867959343154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4907369867959343154'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/10/remove-array-element-based-on-key-value.html' title='Remove array Element based on key value PHP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7529017014215151488</id><published>2011-09-06T15:19:00.002+05:30</published><updated>2011-09-06T15:21:36.383+05:30</updated><title type='text'>Get Drupal Logo Path</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Below is the code to get the Active site logo path in Drupal:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;$logo = theme_get_setting('logo'); &lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7529017014215151488?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7529017014215151488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/09/get-drupal-logo-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7529017014215151488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7529017014215151488'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/09/get-drupal-logo-path.html' title='Get Drupal Logo Path'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2923912897920096916</id><published>2011-07-21T19:55:00.002+05:30</published><updated>2011-07-21T19:58:40.883+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Add Input Format to Textarea in Custom Module</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To apply input formats to any textarea in our custom module forms we can use below code:&lt;br /&gt;&lt;br /&gt;$form['format'] = filter_form(FILTER_FORMAT_DEFAULT);&lt;br /&gt;&lt;br /&gt;example:&lt;br /&gt;$form['body'] = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#type' =&amp;gt; 'textarea',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#title' =&amp;gt; t('Body'),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#default_value' =&amp;gt; 'sample',&lt;br /&gt;&amp;nbsp; );&lt;br /&gt;$form['format'] = filter_form(FILTER_FORMAT_DEFAULT);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are creating Textarea under Fieldset then we have to apply filedset name to that format element as array like:&lt;br /&gt;&lt;br /&gt;$form['filedset']['format'] = filter_form(FILTER_FORMAT_DEFAULT); &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2923912897920096916?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2923912897920096916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/07/add-input-format-to-textarea-in-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2923912897920096916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2923912897920096916'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/07/add-input-format-to-textarea-in-custom.html' title='Add Input Format to Textarea in Custom Module'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7685267666213648162</id><published>2011-07-12T20:01:00.000+05:30</published><updated>2011-07-12T20:01:27.797+05:30</updated><title type='text'>Free Google plus invitation</title><content type='html'>Send me your Email Id's for Free Google Plus Invitaion...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7685267666213648162?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7685267666213648162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/07/free-google-plus-invitation.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7685267666213648162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7685267666213648162'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/07/free-google-plus-invitation.html' title='Free Google plus invitation'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2626312417390096277</id><published>2011-07-03T23:10:00.000+05:30</published><updated>2011-07-03T23:10:00.225+05:30</updated><title type='text'>PGECET 2011 OU Results</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;for PGECET 2011 OU resulsts click below link&lt;br /&gt;&lt;br /&gt;&lt;a href="http://faruq1256.files.wordpress.com/2011/07/oupgecet02072011.pdf"&gt;PGECET-2011&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2626312417390096277?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2626312417390096277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/07/pgecet-2011-ou-results.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2626312417390096277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2626312417390096277'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/07/pgecet-2011-ou-results.html' title='PGECET 2011 OU Results'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8738626004985503730</id><published>2011-06-22T15:22:00.000+05:30</published><updated>2011-06-22T15:22:40.312+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Drupal Module List</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here is the link where you can find all the module list based on the usage per week.&lt;br /&gt;&lt;a href="http://drupal.org/project/usage"&gt;&lt;br /&gt;http://drupal.org/project/usage&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below you can find the video which explains the usage of the each module in real time.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gotdrupal.com/videos/top-drupal-modules"&gt;http://gotdrupal.com/videos/top-drupal-modules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8738626004985503730?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8738626004985503730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/drupal-module-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8738626004985503730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8738626004985503730'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/drupal-module-list.html' title='Drupal Module List'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4579278485023907311</id><published>2011-06-20T11:57:00.000+05:30</published><updated>2011-06-20T11:57:22.695+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Reset admin(uid = 1) password in drupal 7</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;When the password for the user to Drupal (the administrator) is lost  and the e-mail notification does not work, you can set the password via  an SQL query.&lt;br /&gt;&lt;br /&gt;But you must first generate a password hash that apply to your site.&lt;br /&gt;&lt;br /&gt;Run the following commands from the command line, in the Drupal root directory:&lt;br /&gt;For Linux:&lt;br /&gt;&lt;b&gt;&lt;code&gt;./scripts/password-hash.sh &lt;/code&gt;&lt;code&gt;newpassword&lt;/code&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;b&gt;&lt;code&gt;&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;For Windows:&lt;/code&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;php .\scripts\password-hash.sh newpassword&lt;/code&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Then it will generate the Hash Password which somethink like&lt;/code&gt;&lt;br /&gt;$S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WHTsTHiod&lt;br /&gt;&lt;br /&gt;Then execute the following query on the Drupal database:&lt;br /&gt;&lt;b&gt;&lt;code&gt;UPDATE users SET pass ='thepasswordhash' WHERE uid = 1;&lt;/code&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;OR you can use below code to get the Password:&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;cite&gt;require_once 'includes/password.inc';&lt;/cite&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;cite&gt;echo user_hash_password('newpassword');&amp;nbsp; &lt;/cite&gt;&lt;cite&gt;&lt;/cite&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;die();&lt;/code&gt;&lt;/b&gt;&lt;b&gt;&lt;code&gt;&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Add above lines in index.php below this&lt;/code&gt;&lt;br /&gt;&lt;code&gt;drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;b&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/b&gt;&lt;b&gt;&lt;code&gt; &lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;code&gt;And refresh it .&lt;/code&gt;&lt;b&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/b&gt;&lt;b&gt;&lt;code&gt; &lt;/code&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4579278485023907311?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4579278485023907311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/reset-adminuid-1-password-in-drupal-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4579278485023907311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4579278485023907311'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/reset-adminuid-1-password-in-drupal-7.html' title='Reset admin(uid = 1) password in drupal 7'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6349476135095311338</id><published>2011-06-17T12:07:00.002+05:30</published><updated>2011-06-17T12:07:38.305+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Downloaded modules not showing up Drupal</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There are mant reasons to not displaying downloaded modules in admin-&amp;gt;site_build-&amp;gt;modules. I f you face similar issue then please check below methods to resolve it&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Run Cron Manually&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Apply Permission to 755 to modules folder&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Check whether same module is existing with other name(Check file names in side the module folder)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;safe_mode should be OFF(check in phpinfo())&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6349476135095311338?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6349476135095311338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/downloaded-modules-not-showing-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6349476135095311338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6349476135095311338'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/downloaded-modules-not-showing-up.html' title='Downloaded modules not showing up Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1695869994461154659</id><published>2011-06-10T19:28:00.002+05:30</published><updated>2011-06-13T15:01:11.287+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Run Linux on Windows Using VMWare Player</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here is the Good article links which explains clearly how can we install Linux on windows like any other Program using VMWare Player&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.lifehack.org/articles/technology/beginners-guide-run-linux-like-any-other-program-in-windows.html" target="_blank"&gt;http://www.lifehack.org/articles/technology/beginners-guide-run-linux-like-any-other-program-in-windows.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.makeuseof.com/tag/3-ways-to-install-linux-on-windows-or-mac/"&gt;&lt;br /&gt;http://www.makeuseof.com/tag/3-ways-to-install-linux-on-windows-or-mac/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1695869994461154659?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1695869994461154659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/run-linux-on-windows-using-vmware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1695869994461154659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1695869994461154659'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/run-linux-on-windows-using-vmware.html' title='Run Linux on Windows Using VMWare Player'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7037464380087503918</id><published>2011-06-10T19:19:00.000+05:30</published><updated>2011-06-10T19:19:39.634+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MISC'/><title type='text'>Get Firefox  Bookmarks from Hard Drive</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you see files on your hard drive, you can get the HTML file that stores all bookmarks. It is stored in the Profiles folder created by Mozilla.&lt;br /&gt;&lt;br /&gt;In Windows XP/2000&lt;br /&gt;C:\Documents and Settings\&lt;b&gt;username&lt;/b&gt;\Application Data\Mozilla\Firefox\Profiles\&lt;b&gt;xxxxx.default&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In Windows Vista&lt;br /&gt;C:\Users\&lt;b&gt;username&lt;/b&gt;\AppDataRoaming\Mozilla\Firefox\Profiles\xxxxxxxx.defaultbookmarks.html&lt;br /&gt;&lt;br /&gt;In Windows 98 &amp;amp; ME&lt;br /&gt;C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.defaultbookmarks.html&lt;br /&gt;&lt;br /&gt;You can import bookmarks and the location of files from your old hard drive in Firefox or IE on your computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7037464380087503918?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7037464380087503918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/get-firefox-bookmarks-from-hard-drive.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7037464380087503918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7037464380087503918'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/get-firefox-bookmarks-from-hard-drive.html' title='Get Firefox  Bookmarks from Hard Drive'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4139305484582550403</id><published>2011-06-10T16:10:00.000+05:30</published><updated>2011-06-10T16:10:58.969+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Implement Start Number and End Number of the Search Results in Drupal</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here is the code for implement start result and end result of the search results in Drupal.&lt;br /&gt;&amp;nbsp;First we need to define Global variables of the Pager.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;global $pager_page_array, $pager_total, $pager_total_items;&lt;br /&gt;&lt;br /&gt;//establish page variables&lt;br /&gt;&amp;nbsp; $total_pages = $pager_total['0'];&lt;br /&gt;&amp;nbsp; $total_page_count = $total_pages - 1;&lt;br /&gt;&amp;nbsp; //approx number of results based on page count&lt;br /&gt;&amp;nbsp; $approx_results = $total_pages * 10;&lt;br /&gt;&amp;nbsp; //calculate range&lt;br /&gt;&amp;nbsp; $page_number = $pager_page_array['0'];&lt;br /&gt;&amp;nbsp; $start_result = $page_number * 10 + 1;&lt;br /&gt;&amp;nbsp; $end_result = $page_number * 10 + 10;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4139305484582550403?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4139305484582550403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/implement-start-number-and-end-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4139305484582550403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4139305484582550403'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/implement-start-number-and-end-number.html' title='Implement Start Number and End Number of the Search Results in Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4848822500838215189</id><published>2011-06-10T16:01:00.002+05:30</published><updated>2011-06-10T16:05:40.284+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Customize  "Your search yielded no results" Text in Search Results Drupal</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Below is the sample code for customizing the "Your search yielded no results"&amp;nbsp; message in Template.php file&lt;br /&gt;&lt;br /&gt;function theme_name_box($title, $content, $region = 'main') {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; if ($title == 'Your search yielded no results')&lt;br /&gt;&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $title = 'Sorry, we couldn\'t find what you were looking for';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $content = 'Check if your spelling is correct.';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;$output = '&amp;lt;div style="margin:10px"&amp;gt;&amp;lt;h3&amp;gt;'. $title .'&amp;lt;/h3&amp;gt;'. $content .'&amp;lt;/div&amp;gt;';&lt;br /&gt;&lt;br /&gt;&amp;nbsp; return $output;&lt;br /&gt;&lt;br /&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4848822500838215189?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4848822500838215189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/customize-your-search-yielded-no.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4848822500838215189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4848822500838215189'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/customize-your-search-yielded-no.html' title='Customize  &quot;Your search yielded no results&quot; Text in Search Results Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4035283058129234668</id><published>2011-06-08T19:47:00.000+05:30</published><updated>2011-06-08T19:47:58.702+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Ajax Module With Image Button Drupal</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you are using Ajax module for Drupal Forms which having image button, then you can not submit the form.&lt;br /&gt;To fix that kind of issue then we have to use&amp;nbsp; '#button_type' =&amp;gt; 'submit ajax-trigger', attribute to submit button. Below is the sample code...&lt;br /&gt;&lt;br /&gt;$path = drupal_get_path('theme', 'tradenet').'/images/image_button.png';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $form['#ajax'] = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'enabled' =&amp;gt; TRUE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $form['submit'] = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#type' =&amp;gt; 'image_button',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#access' =&amp;gt; 1,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#button_type' =&amp;gt; 'submit ajax-trigger',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#src'=&amp;gt;$path,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '#ajax' =&amp;gt; array('submitter' =&amp;gt; TRUE ),&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4035283058129234668?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4035283058129234668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/ajax-module-with-image-button-drupal.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4035283058129234668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4035283058129234668'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/ajax-module-with-image-button-drupal.html' title='Ajax Module With Image Button Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4212618308294237485</id><published>2011-06-08T15:17:00.001+05:30</published><updated>2011-06-08T15:18:13.758+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Remove colon from label Drupal</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;code&gt;To remove Colon from label for form elements just add this below code in to your template.php of the active theme. And replace Theme with your theme name. You can find Original code at &lt;/code&gt;includes/form.inc&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &lt;/code&gt;&lt;br /&gt;&lt;code&gt;function theme_form_element($element, $value) {&lt;br /&gt;&amp;nbsp; // This is also used in the installer, pre-database setup.&lt;br /&gt;&amp;nbsp; $t = get_t();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; $output = '&lt;/code&gt;&lt;br /&gt;&lt;div ;="" class="form-item"&gt;&lt;br /&gt;&amp;nbsp; if (!empty($element['#id'])) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output .= ' id="'. $element['#id'] .'-wrapper"';&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; $output .= "&amp;gt;\n";&lt;br /&gt;&amp;nbsp;  $required = !empty($element['#required']) ? '&lt;span class="form-required" title="'. $t('This field is required.') .'"&gt;*&lt;/span&gt;' : '';&lt;br /&gt;&lt;br /&gt;&amp;nbsp; if (!empty($element['#title'])) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $title = $element['#title'];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!empty($element['#id'])) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  $output .= ' &lt;label for="'. $element['#id'] .'"&gt;'. $t('!title  !required', array('!title' =&amp;gt; filter_xss_admin($title), '!required'  =&amp;gt; $required)) ."&lt;/label&gt;\n";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  $output .= ' &lt;label&gt;'. $t('!title !required', array('!title' =&amp;gt;  filter_xss_admin($title), '!required' =&amp;gt; $required))  ."&lt;/label&gt;\n";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; $output .= " $value\n";&lt;br /&gt;&lt;br /&gt;&amp;nbsp; if (!empty($element['#description'])) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output .= ' &lt;br /&gt;&lt;div class="description"&gt;'. $element['#description'] ."&lt;/div&gt;\n";&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; $output .= "&lt;/div&gt;\n";&lt;br /&gt;&lt;br /&gt;&amp;nbsp; return $output;&lt;br /&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4212618308294237485?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4212618308294237485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/remove-colon-from-label-drupal.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4212618308294237485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4212618308294237485'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/remove-colon-from-label-drupal.html' title='Remove colon from label Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-951395143041193894</id><published>2011-06-03T12:40:00.001+05:30</published><updated>2011-06-03T12:41:32.054+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><category scheme='http://www.blogger.com/atom/ns#' term='RDF'/><title type='text'>Drupal 7 supports RDF</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;RDF (Resource Description Framework), which is a standard for encoding metadata and other information on the Semantic Web. In the Semantic Web, data processing applications using the dissemination of structured information in a decentralized and distributed all over the web today. RDF is an abstract, how to break information into separate pieces, and even if it is more popularly known in / RDF XML syntax, RDF can be stored in different formats. This article discusses the abstract RDF model, two specific serialization formats such as RDF is used and how it differs from the standard XML, the higher the level of the RDF semantics, best practices, implementation and querying RDF data sources.&lt;br /&gt;&lt;br /&gt;Here are the some good Video Tutorials about RDF:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://2.gvt0.com/vi/ldl0m-5zLz4/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ldl0m-5zLz4&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/ldl0m-5zLz4&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://0.gvt0.com/vi/o3UmNZzhk2A/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/o3UmNZzhk2A&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/o3UmNZzhk2A&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-951395143041193894?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/951395143041193894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/drupal-7-supports-rdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/951395143041193894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/951395143041193894'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/drupal-7-supports-rdf.html' title='Drupal 7 supports RDF'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6534569712639706065</id><published>2011-06-03T11:29:00.001+05:30</published><updated>2011-06-03T12:37:22.679+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>PhpPgAdmin First time Login Problem</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A problem that occurs very often the error message "&lt;b&gt;Access is prohibited for safety reasons&lt;/b&gt;," which occurs when a user tries to access a blank password, a common (presumably well-protected) on development machines. For such access, set ['extra_login_security'] to FALSE in the&amp;nbsp;&lt;code&gt;conf/config.inc.php&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;['extra_login_security'] = false;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6534569712639706065?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6534569712639706065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/phppgadmin-first-time-login-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6534569712639706065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6534569712639706065'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/phppgadmin-first-time-login-problem.html' title='PhpPgAdmin First time Login Problem'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4804717454793312032</id><published>2011-06-01T11:58:00.003+05:30</published><updated>2011-06-01T12:18:29.805+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>Configure PostgreSQL in WAMP Server</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://3.bp.blogspot.com/-sEUsijy7_Bc/TeXgpWOuCTI/AAAAAAAAAOA/mp1gjcnz_bA/s1600/PostgreSQL+Logo.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-sEUsijy7_Bc/TeXgpWOuCTI/AAAAAAAAAOA/mp1gjcnz_bA/s1600/PostgreSQL+Logo.gif" /&gt;&lt;/a&gt;Here is the good PDF file which explains how to install PostgreSQL in WAMP server.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://faruq1256.files.wordpress.com/2011/06/26250995-installing-wampserver2-0c-with-postgresql.pdf" target="_blank"&gt;Installing-WampServer2-0c-With-PostgreSQL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are using php 5.2.6, there is some problem in adapter of php5.2.6, thats it is unable connect to PostgreSQL. For making connection we are using adapter of php5.2.5. you can download dll files using below link if you dont find in online.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://slamfolks.com/downloads/php5.2.5-pgsql.zip" target="_blank"&gt;php5.2.4 dll files&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4804717454793312032?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4804717454793312032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/06/configure-postgresql-in-wamp-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4804717454793312032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4804717454793312032'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/06/configure-postgresql-in-wamp-server.html' title='Configure PostgreSQL in WAMP Server'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-sEUsijy7_Bc/TeXgpWOuCTI/AAAAAAAAAOA/mp1gjcnz_bA/s72-c/PostgreSQL+Logo.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3828432463048217806</id><published>2011-05-30T17:53:00.000+05:30</published><updated>2011-05-30T17:53:33.711+05:30</updated><title type='text'>OSMANIA UNIVERSITY APSCHE PGECET 2011 EXAM HALL TICKETS, ADMIT CARD DOWNLOAD NOW</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here is the Link for downloading the PGECET 2011 examination Hall tickets Online..&lt;br /&gt;&lt;br /&gt;&lt;a href="http://202.53.85.199/oupgecet2011/"&gt;http://202.53.85.199/oupgecet2011/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3828432463048217806?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3828432463048217806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/osmania-university-apsche-pgecet-2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3828432463048217806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3828432463048217806'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/osmania-university-apsche-pgecet-2011.html' title='OSMANIA UNIVERSITY APSCHE PGECET 2011 EXAM HALL TICKETS, ADMIT CARD DOWNLOAD NOW'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5346852813203499675</id><published>2011-05-25T15:30:00.001+05:30</published><updated>2011-05-25T15:33:32.817+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MISC'/><title type='text'>Write ASCII codes in Text Editors</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To write some charecters, letters or symbols which are not available in our keyboard, portable personal computers, notebooks, laptops, etc.. we can print using ASCII code.&lt;br /&gt;Below is the example to print symbols.&lt;br /&gt;&lt;br /&gt;1) Open your favourite Text Editor.&lt;br /&gt;&lt;br /&gt;2) Press the "ALT KEY" in your keyboard and hold it, do not release the key.&lt;br /&gt;&lt;br /&gt;3) In the numeric keypad type the numbers "131", that correspond to the ASCII code for the character, letter or symbol "â" .&lt;br /&gt;&lt;br /&gt;4) Release "ALT KEY" to Print ASCII Code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.theasciicode.com.ar/"&gt;Here&lt;/a&gt; is the link for detailed information&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5346852813203499675?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5346852813203499675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/write-ascii-codes-in-text-editors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5346852813203499675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5346852813203499675'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/write-ascii-codes-in-text-editors.html' title='Write ASCII codes in Text Editors'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3813672075666737449</id><published>2011-05-14T15:27:00.000+05:30</published><updated>2011-05-14T15:27:21.219+05:30</updated><title type='text'>Google SMS Channels: Send SMS Text Messages to your Group for Free</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://labs.google.co.in/smschannels/browse"&gt;&lt;/a&gt;Now we can send SMS to our mobile numbers for free. Google has introduced service called Google SMS Channels. Using this service you can subscribe to news alerts, blog updates and other kinds of information like horoscopes, jokes, stocks or even cricket scores via SMS text messages.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labs.google.co.in/smschannels/browse"&gt;Here&amp;nbsp; &lt;/a&gt;you can Subscribe to Service.&lt;br /&gt;&lt;br /&gt;For more information &lt;a href="http://www.labnol.org/internet/google-sms-subscribe-rss-via-sms/4726/"&gt;Click Here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3813672075666737449?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3813672075666737449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/google-sms-channels-send-sms-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3813672075666737449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3813672075666737449'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/google-sms-channels-send-sms-text.html' title='Google SMS Channels: Send SMS Text Messages to your Group for Free'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1925246387561679882</id><published>2011-05-12T15:53:00.000+05:30</published><updated>2011-05-14T02:06:48.231+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Apply a patch to a drupal Module from Windows</title><content type='html'>Using Eclips we can easily apply patch to drupal module.Below are the steps..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Eclipse&lt;br /&gt;To apply patches to code using Eclipse:&lt;br /&gt;&lt;br /&gt;   1. Menu &gt; windows &gt; open perspective &gt; others &gt; team synchronizing&lt;br /&gt;   2. Open the patch file, select all text and copy it to clipboard (Ctrl+ C)&lt;br /&gt;   3. Menu &gt; project &gt; apply patch&lt;br /&gt;   4. Select clipboard, click next, select the file you want to patch, click finish or next to setup patching options.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1925246387561679882?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1925246387561679882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/apply-patch-to-drupal-module-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1925246387561679882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1925246387561679882'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/apply-patch-to-drupal-module-from.html' title='Apply a patch to a drupal Module from Windows'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2883971667710293727</id><published>2011-05-07T19:18:00.002+05:30</published><updated>2011-05-07T19:19:12.862+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Free Download Ebook</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here is the good URL for downloading free ebooks &amp;nbsp; &lt;br /&gt;&lt;a href="http://123techbooks.co.cc/" target="_blank"&gt;http://123techbooks.co.cc&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2883971667710293727?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2883971667710293727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/free-download-ebook.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2883971667710293727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2883971667710293727'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/free-download-ebook.html' title='Free Download Ebook'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4319475313159456276</id><published>2011-05-05T21:48:00.004+05:30</published><updated>2011-05-05T21:54:00.042+05:30</updated><title type='text'>28 HTML5 Features, Tips, and Techniques</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here are the 28 new features coming with HTML5.Presently Chrome, IE9 and Firefox4 supporting HTML5.&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;New Doctype&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;The Figure Element &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;small&gt; Redefined&lt;/small&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;No More Types for Scripts and Links &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;To Quote or Not to Quote. &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Make your Content Editable &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Email Inputs &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Placeholders&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Local Storage&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;The Semantic Header and Footer&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;More HTML5 Form Features &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Internet Explorer and HTML5&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;hgroup &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Required Attribute &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Autofocus Attribute &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Audio Support&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Video Support&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Preload Videos &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Display Controls &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Regular Expressions &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Detect Support for Attributes&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Mark Element &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;When to Use a &lt;/span&gt;&lt;/small&gt;&lt;div&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/small&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;What to Immediately Begin Using&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;What is Not HTML5&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;The Data Attribute&lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;The Output Element &lt;/span&gt;&lt;/small&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;h2 style="font-weight: normal; text-align: left;"&gt;&lt;small&gt;&lt;span style="font-size: small;"&gt;Create Sliders with the Range Input&lt;/span&gt;&lt;/small&gt;&lt;/h2&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Please&amp;nbsp; &lt;a href="http://net.tutsplus.com/tutorials/html-css-techniques/25-html5-features-tips-and-techniques-you-must-know/"&gt;click here&lt;/a&gt; to know detail information.&lt;br /&gt;&lt;br /&gt;Good Video for HTML5 beginners&lt;br /&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/spjOAFGxOP0/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/spjOAFGxOP0&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/spjOAFGxOP0&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;More URL's:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://net.tutsplus.com/sessions/html5-and-you/"&gt;http://net.tutsplus.com/sessions/html5-and-you/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-new-html5-form-features/%20"&gt;http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-new-html5-form-features/ &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4319475313159456276?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4319475313159456276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/05/28-html5-features-tips-and-techniques.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4319475313159456276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4319475313159456276'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/05/28-html5-features-tips-and-techniques.html' title='28 HTML5 Features, Tips, and Techniques'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8243590110377136072</id><published>2011-04-27T20:27:00.000+05:30</published><updated>2011-04-27T20:27:18.299+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>20 things about Browsers</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To know more about browsers and web just go through with below link...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.20thingsilearned.com/" target="_blank"&gt;http://www.20thingsilearned.&lt;wbr&gt;&lt;/wbr&gt;com/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8243590110377136072?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8243590110377136072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/04/20-things-about-browsers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8243590110377136072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8243590110377136072'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/04/20-things-about-browsers.html' title='20 things about Browsers'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1800449776829402105</id><published>2011-04-07T21:38:00.002+05:30</published><updated>2011-04-07T21:38:27.081+05:30</updated><title type='text'>Eliminate Viruses from Your Pen Drive</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;Published on February 5, 2009&lt;br /&gt;An easy way for computers get a virus is from the use of pen drives (also known as USB devices or flash drives). Many viruses like the Ravmon virus and Heap41, which is a worm, are not detected by the usual anti-virus software. These viruses spread rapidly through USB devices. Suma Munireddy—our Employee Journalist from Bangalore—sent us a useful tip on how to protect your computer from viruses spread through USB devices.&lt;br /&gt;1. Plug your pen drive or USB device to the computer.&lt;br /&gt;2. After a few moments, a dialog box will pop up. Ignore this dialog box by clicking Cancel.&lt;br /&gt;3. Now go to Start --&amp;gt; Run and type cmd to open the Command Prompt window.&lt;br /&gt;4. In the Command window, type the USB drive letter and then press Enter. For instance, the drive letter for your USB device may be “E:” In this case, type “E:” in the Command window and press Enter.&lt;br /&gt;5. Then, type dir/w/o/a/p and press Enter.&lt;br /&gt;You will now get a list of files. In the list, see if you have any of the following:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Autorun.inf&lt;br /&gt;&amp;nbsp;* &amp;nbsp; New Folder.exe&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Bha.vbs&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Iexplore.vbs&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Info.exe&lt;br /&gt;&amp;nbsp;* &amp;nbsp; New_Folder.exe&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Ravmon.exe&lt;br /&gt;&amp;nbsp;* &amp;nbsp; RVHost.exe&lt;br /&gt;&amp;nbsp;* &amp;nbsp; Any other files with .exe extension&lt;br /&gt;If you notice any of the files above, type attrib -h -r -s -a *.* and press Enter.&lt;br /&gt;Now delete each of the above files by typing the following command: del "filename" (for instance, del autorun.inf).&lt;br /&gt;That’s all there is to it! Now just scan your USB drive with the anti-virus software you have to ensure that your pen drive is really free of all viruses.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1800449776829402105?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1800449776829402105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/04/eliminate-viruses-from-your-pen-drive.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1800449776829402105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1800449776829402105'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/04/eliminate-viruses-from-your-pen-drive.html' title='Eliminate Viruses from Your Pen Drive'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5399750119556832439</id><published>2011-03-18T23:12:00.001+05:30</published><updated>2011-03-18T23:12:51.053+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>extend CCK-fields with custom formatters</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;We can create new custom formatter for CCK fields using hook_field_formatter_info(), below is the example&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeblock"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&lt;br /&gt;* Implementation of hook_field_formatter_info().&lt;br /&gt;*/&lt;/span&gt;&lt;span style="color: #007700;"&gt;function &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;myModule_field_formatter_info&lt;/span&gt;&lt;span style="color: #007700;"&gt;() {&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$formatters &lt;/span&gt;&lt;span style="color: #007700;"&gt;= array();&lt;br /&gt;&amp;nbsp; if (&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;module_exists&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'filefield'&lt;/span&gt;&lt;span style="color: #007700;"&gt;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$formatters&lt;/span&gt;&lt;span style="color: #007700;"&gt;[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'myFormatter'&lt;/span&gt;&lt;span style="color: #007700;"&gt;] = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'label' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;t&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'My Formatter'&lt;/span&gt;&lt;span style="color: #007700;"&gt;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'field types' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'filefield'&lt;/span&gt;&lt;span style="color: #007700;"&gt;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'multiple values' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;CONTENT_HANDLE_CORE&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; return &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$formatters&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&lt;br /&gt;* Theme function for myFormatter from hook_field_formatter_info.&lt;br /&gt;* @param $element&lt;br /&gt;*&amp;nbsp;&amp;nbsp; an array of formatter info and the item to theme. look in $element['#item'] for the field item to theme.&lt;br /&gt;*/&lt;/span&gt;&lt;span style="color: #007700;"&gt;function &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;theme_myModule_formatter_myFormatter&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$element&lt;/span&gt;&lt;span style="color: #007700;"&gt;) {&lt;br /&gt;&amp;nbsp; return &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;"themed element"&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&lt;br /&gt;* Implementation of hook_theme().&lt;br /&gt;*/&lt;/span&gt;&lt;span style="color: #007700;"&gt;function &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;myModule_theme&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$existing&lt;/span&gt;&lt;span style="color: #007700;"&gt;, &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$type&lt;/span&gt;&lt;span style="color: #007700;"&gt;, &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$theme&lt;/span&gt;&lt;span style="color: #007700;"&gt;, &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$path&lt;/span&gt;&lt;span style="color: #007700;"&gt;) {&lt;br /&gt;&amp;nbsp; return array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'myModule_formatter_myFormatter' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'arguments' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'element' &lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: #0000bb;"&gt;NULL&lt;/span&gt;&lt;span style="color: #007700;"&gt;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br /&gt;&amp;nbsp; );&lt;br /&gt;}&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5399750119556832439?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5399750119556832439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/03/extend-cck-fields-with-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5399750119556832439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5399750119556832439'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/03/extend-cck-fields-with-custom.html' title='extend CCK-fields with custom formatters'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4208742907445356155</id><published>2011-03-16T21:29:00.000+05:30</published><updated>2011-03-16T21:29:35.722+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Find number of weeks in a Year</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal"&gt;$weeks_in_year = strftime("%W",strtotime("12/&lt;wbr&gt;&lt;/wbr&gt;31/".date('Y')));&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4208742907445356155?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4208742907445356155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/03/find-number-of-weeks-in-year.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4208742907445356155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4208742907445356155'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/03/find-number-of-weeks-in-year.html' title='Find number of weeks in a Year'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4423077082230762885</id><published>2011-02-18T23:57:00.000+05:30</published><updated>2011-02-18T23:57:38.755+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Get number of weeks between 2 dates</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div&gt;&lt;div class="MsoNormal"&gt;function weeks_between($datefrom, $dateto)&lt;/div&gt;&lt;div class="MsoNormal"&gt;{&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $datefrom_arr = explode("-", $datefrom);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $datefrom = mktime(0,0,0,$datefrom_arr[1], $datefrom_arr[2], $datefrom_arr[0]);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //echo date('Y-m-d',mktime(0,0,0,$&lt;wbr&gt;&lt;/wbr&gt;datefrom_arr[1], $datefrom_arr[2]+7, $datefrom_arr[0]));&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dateto_arr = explode("-",$dateto);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dateto = mktime(0,0,0,$dateto_arr[1], $dateto_arr[2], $dateto_arr[0]);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $day_of_week = date("w", $datefrom);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $fromweek_start = $datefrom - ($day_of_week * 86400) - ($datefrom % 86400); &lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$diff_days = days_between($datefrom, $dateto);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $diff_weeks = intval($diff_days / 7);&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $seconds_left = ($diff_days % 7) * 86400;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( ($datefrom - $fromweek_start) + $seconds_left &amp;gt; 604800 )&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $diff_weeks ++;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $diff_weeks;&lt;/div&gt;&lt;div class="MsoNormal"&gt;}&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;function days_between($datefrom,$&lt;wbr&gt;&lt;/wbr&gt;dateto){&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $fromday_start = mktime(0,0,0,date("m",$&lt;wbr&gt;&lt;/wbr&gt;datefrom),date("d",$datefrom),&lt;wbr&gt;&lt;/wbr&gt;date("Y",$datefrom));&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $diff = $dateto - $datefrom;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $days = intval( $diff / 86400 ); // 86400&amp;nbsp; / day&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( ($datefrom - $fromday_start) + ($diff % 86400) &amp;gt; 86400 )&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $days++;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp; $days;&lt;/div&gt;&lt;div class="MsoNormal"&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4423077082230762885?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4423077082230762885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/02/get-number-of-weeks-between-2-dates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4423077082230762885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4423077082230762885'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/02/get-number-of-weeks-between-2-dates.html' title='Get number of weeks between 2 dates'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8442426252812399846</id><published>2011-01-28T21:42:00.001+05:30</published><updated>2011-01-28T21:42:48.504+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Send Text Messages with PHP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;PText messaging has become extremely widespread throughout the world — to  the point where an increasing number of web applications have  integrated SMS to notify users of events, sales or coupons directly  through their mobile devices.&lt;br /&gt;&lt;br /&gt;For more Information:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://net.tutsplus.com/tutorials/php/how-to-send-text-messages-with-php/"&gt;http://net.tutsplus.com/tutorials/php/how-to-send-text-messages-with-php/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8442426252812399846?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8442426252812399846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/01/send-text-messages-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8442426252812399846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8442426252812399846'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/01/send-text-messages-with-php.html' title='Send Text Messages with PHP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7242205886187823382</id><published>2011-01-28T21:25:00.002+05:30</published><updated>2011-01-28T21:26:39.668+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Introduction to creating desktop applications with PHP and Titanium</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;We can now create desktop applications&amp;nbsp;without learning a completely  new programming language! That is with the help of a free and open  source tool called "Titanium". Whats more you will use your existing CSS  and Javascript and PHP knowledge.&lt;br /&gt;&lt;br /&gt;For more Information Visit:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sanisoft.com/blog/2011/01/03/introduction-to-creating-desktop-applications-with-php-and-titanium/"&gt;http://www.sanisoft.com/blog/2011/01/03/introduction-to-creating-desktop-applications-with-php-and-titanium/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7242205886187823382?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7242205886187823382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2011/01/introduction-to-creating-desktop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7242205886187823382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7242205886187823382'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2011/01/introduction-to-creating-desktop.html' title='Introduction to creating desktop applications with PHP and Titanium'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2757878645947983345</id><published>2010-11-15T22:33:00.001+05:30</published><updated>2010-11-15T22:35:18.932+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>drupal_set_message() in user_logout</title><content type='html'>&lt;a href="http://drupal.org/node/754560" target="_blank"&gt;http://drupal.org/node/754560&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; $cookieParams = session_get_cookie_params();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; session_start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; session_set_cookie_params($&lt;br /&gt;&lt;div id=":2b"&gt;&lt;wbr&gt;&lt;/wbr&gt;cookieParams);&lt;br /&gt;&amp;nbsp; // Load the anonymous user&lt;br /&gt;&amp;nbsp; $user = drupal_anonymous_user(session_&lt;wbr&gt;&lt;/wbr&gt;id());&lt;br /&gt;&amp;nbsp; drupal_set_message(t('You have successfully logged out of the system. Enter your Username and Passwords below to login again.'));&lt;/div&gt;&lt;img alt="" class="mL" src="https://mail.google.com/mail/images/cleardot.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2757878645947983345?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2757878645947983345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/11/drupalsetmessage-in-userlogout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2757878645947983345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2757878645947983345'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/11/drupalsetmessage-in-userlogout.html' title='drupal_set_message() in user_logout'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3283461355327930739</id><published>2010-10-28T16:25:00.003+05:30</published><updated>2010-11-02T15:56:42.336+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>drupal_get_form() for returning a node form</title><content type='html'>// required for Drupal 6&lt;br /&gt;module_load_include('inc', 'node', 'node.pages'); &lt;br /&gt;// which nodeform you want&lt;br /&gt;$node_type = 'YOURNODETYPE';&lt;br /&gt;$form_id = $node_type . '_node_form';&lt;br /&gt;// maybe add current users info&lt;br /&gt;global $user;&lt;br /&gt;// create a blank node&lt;br /&gt;&lt;br /&gt;$node-&amp;gt;uid = $user-&amp;gt;uid;&lt;br /&gt;$node-&amp;gt;name = (isset($user-&amp;gt;name) ? $user-&amp;gt;name : '');&lt;br /&gt;$node-&amp;gt;type = $node_type;&lt;br /&gt;&lt;br /&gt;// Invoke hook_nodapi and hook_node&lt;br /&gt;node_object_prepare($node);&lt;br /&gt;// Or you can also use an exiting node, for example&lt;br /&gt;// $node = node_load(123);&lt;br /&gt;// and the display the form:&lt;br /&gt;$output = drupal_get_form($form_id, $node);&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;For User Edit Form:&lt;br /&gt;&lt;br /&gt;include_once drupal_get_path('module', 'user') . '/user.pages.inc';&lt;br /&gt;global $user; &lt;br /&gt;&amp;nbsp;$output = ""; &lt;br /&gt;&amp;nbsp;$account = user_load($user-&amp;gt;uid);&lt;br /&gt;&amp;nbsp;$category = 'account';&lt;br /&gt;//&amp;nbsp; print_r($userInfo);&lt;br /&gt;&amp;nbsp;$output = drupal_get_form('user_profile_form', $account, $category);&lt;br /&gt;return $output;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3283461355327930739?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3283461355327930739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/10/drupalgetform-for-returning-node-form.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3283461355327930739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3283461355327930739'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/10/drupalgetform-for-returning-node-form.html' title='drupal_get_form() for returning a node form'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2622932865896596232</id><published>2010-09-22T02:16:00.000+05:30</published><updated>2010-09-22T02:16:00.565+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install Adobe Reader (acroread) on Fedora 12 and Fedora 13</title><content type='html'>http://macintoshbrasil.com/2010/06/10/install-adobe-acrobat-pdf-reader-on-fedora-centos-red-hat-rhel/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2622932865896596232?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2622932865896596232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/09/install-adobe-reader-acroread-on-fedora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2622932865896596232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2622932865896596232'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/09/install-adobe-reader-acroread-on-fedora.html' title='Install Adobe Reader (acroread) on Fedora 12 and Fedora 13'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5225503251399593454</id><published>2010-09-14T16:08:00.001+05:30</published><updated>2010-09-14T16:08:07.065+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Enable the New Google Search</title><content type='html'>1. Go to Google.com.&lt;br /&gt;2. Once it loads, enter this code into your web browser's URL address field:&lt;br /&gt;&lt;br /&gt;    javascript:void(document.cookie="PREF=ID=20b6e4c2f44943bb:U=4bf292d46faad806:TM=1249677602:LM=1257919388:S=odm0Ys-53ZueXfZG;path=/; domain=.google.com");&lt;br /&gt;&lt;br /&gt;There shouldn't be any http://google.com in front of that. Just that code.&lt;br /&gt;&lt;br /&gt;3. Hit enter.&lt;br /&gt;4. Reload or open a new Google.com page and you will have access to the new user interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5225503251399593454?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5225503251399593454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/09/enable-new-google-search.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5225503251399593454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5225503251399593454'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/09/enable-new-google-search.html' title='Enable the New Google Search'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8091957788818691111</id><published>2010-09-06T13:07:00.000+05:30</published><updated>2010-09-06T13:07:18.203+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>get the Next Auto Increment number in Mysql</title><content type='html'>$query = mysql_query("SELECT MAX(id) FROM `table`");&lt;br /&gt;$results = mysql_fetch_array($query);&lt;br /&gt;echo $results["Auto_increment"];&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8091957788818691111?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8091957788818691111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/09/get-next-auto-increment-number-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8091957788818691111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8091957788818691111'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/09/get-next-auto-increment-number-in-mysql.html' title='get the Next Auto Increment number in Mysql'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3192067495548619917</id><published>2010-09-03T16:12:00.003+05:30</published><updated>2010-09-03T16:13:22.271+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Drupal l() With complex link with image Example</title><content type='html'>$img = '&lt; img src="'.$base_path . $directory . '/images/rssIcon.png" &gt;';&lt;br /&gt;l($img, 'user/3', array('attributes' =&gt; array('class' =&gt; 'link', 'id' =&gt; 'xxx', 'title' =&gt; 'Title'), 'html' =&gt; 'true'));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3192067495548619917?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3192067495548619917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/09/drupal-l-with-complex-link-with-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3192067495548619917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3192067495548619917'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/09/drupal-l-with-complex-link-with-image.html' title='Drupal l() With complex link with image Example'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6208360881442212113</id><published>2010-08-26T20:42:00.001+05:30</published><updated>2010-08-26T20:42:18.676+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>IEs4Linux (Fedora)</title><content type='html'>Open a terminal. Log in as root to install wine and cabextract:&lt;br /&gt;&lt;br /&gt;yum -y install wine*&lt;br /&gt;yum -y install cabextract&lt;br /&gt;&lt;br /&gt;Logout and install IEs 4 Linux with your normal user account:&lt;br /&gt;&lt;br /&gt;wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz&lt;br /&gt;tar zxvf ies4linux-latest.tar.gz&lt;br /&gt;cd ies4linux-*&lt;br /&gt;./ies4linux&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6208360881442212113?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6208360881442212113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/08/ies4linux-fedora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6208360881442212113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6208360881442212113'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/08/ies4linux-fedora.html' title='IEs4Linux (Fedora)'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5503080567037372973</id><published>2010-08-24T12:41:00.002+05:30</published><updated>2010-08-24T12:41:44.425+05:30</updated><title type='text'>Installing rar and unrar programs in Linux or Unix</title><content type='html'>Under Debian Linux, you can use the same apt-get method as follows to install unrar program:&lt;br /&gt;&lt;br /&gt;$ apt-get install unrar&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are using Fedora core Linux then use yum command as follows:&lt;br /&gt;&lt;br /&gt;$ yum install unrar&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are using FreeBSD, you can use:&lt;br /&gt;&lt;br /&gt;$ pkg_add -v -r unrar&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If any of above, methods is not working, you can download binary package from official rarlab site and choose the right package for your machine... for example, i chose the latest (by the time i write this post):&lt;br /&gt;&lt;br /&gt;$ cd /tmp&lt;br /&gt;$ wget http://www.rarlab.com/rar/rarlinux-3.7.1.tar.gz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then untar the file:&lt;br /&gt;&lt;br /&gt;$ tar -zxvf rarlinux-3.7.1.tar.gz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Both rar and unrar commands are located in rar sub-directory. Just go to rar directory:&lt;br /&gt;&lt;br /&gt;$ cd rar&lt;br /&gt;$ ./unrar&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now copy rar and unrar to /bin directory:&lt;br /&gt;&lt;br /&gt;$ cp rar unrar /bin&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then you can use the same method on creating and extracting rar files in linux in my previous post.&lt;br /&gt;&lt;br /&gt;Another thing to add, you can also test the integrity of archive, with this command:&lt;br /&gt;&lt;br /&gt;$ unrar t filename.rar &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or list the files inside the rar file using this command:&lt;br /&gt;&lt;br /&gt;$ unrar l filename.rar&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5503080567037372973?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5503080567037372973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/08/installing-rar-and-unrar-programs-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5503080567037372973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5503080567037372973'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/08/installing-rar-and-unrar-programs-in.html' title='Installing rar and unrar programs in Linux or Unix'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7958408418394948892</id><published>2010-08-12T20:40:00.002+05:30</published><updated>2010-08-12T20:48:38.625+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>Export Database Data to .XLS in PHP</title><content type='html'>&lt;p&gt;&lt;code&gt;&lt;br /&gt;$DB_Server = "localhost";&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //your MySQL Server &lt;br /&gt;$DB_Username = "username"; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //your MySQL User Name &lt;br /&gt;$DB_Password = "password";&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //your MySQL Password &lt;br /&gt;$DB_DBName = "databasename";&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //your MySQL Database Name &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&amp;nbsp;$DB_TBLName = "users";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //your MySQL Table Name &lt;br /&gt;$ttype = $DB_TBLName;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;$sql = "Select * from $DB_TBLName";&amp;nbsp; &lt;br /&gt;&lt;br /&gt;$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die("Couldn't connect to MySQL:&lt;br /&gt;" . mysql_error() . "&lt;br /&gt;" . mysql_errno());&lt;br /&gt;//select database&lt;br /&gt;$Db = @mysql_select_db($DB_DBName, $Connect)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die("Couldn't select database:&lt;br /&gt;" . mysql_error(). "&lt;br /&gt;" . mysql_errno());&lt;br /&gt;//execute query&lt;br /&gt;$result = @mysql_query($sql,$Connect)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die("Couldn't execute query:&lt;br /&gt;" . mysql_error(). "&lt;br /&gt;" . mysql_errno());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while($row = mysql_fetch_row($result))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$data = $row;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;br /&gt;function cleanData(&amp;amp;$str)   {     &lt;br /&gt;$str = preg_replace("/\t/", "\\t", $str);     &lt;br /&gt;$str = preg_replace("/\r?\n/", "\\n", $str);&lt;br /&gt;&lt;span&gt; if(strstr($str, '"')) &lt;br /&gt;$str = '"' . str_replace('"', '""',  $str) . '"';&lt;/span&gt;&lt;br /&gt;}  &lt;br /&gt;&lt;span&gt; &lt;br /&gt;# filename for download   $filename = "website_data_" . date('Ymd') . ".xls";  &lt;br /&gt;header("Content-Disposition: attachment; filename=\"$filename\"");   &lt;br /&gt;header("Content-Type: application/vnd.ms-excel");&lt;br /&gt;&lt;/span&gt; $flag = false;   &lt;br /&gt;foreach($data as $row) {     &lt;br /&gt;if(!$flag) {       # display field/column names as first row       echo implode("\t", array_keys($row)) . "\n";   &lt;br /&gt;$flag = true;  &lt;br /&gt;}  &lt;br /&gt;array_walk($row, 'cleanData');   &lt;br /&gt;echo implode("\t", array_values($row)) . "\n"; &lt;br /&gt;}  &lt;br /&gt;exit;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7958408418394948892?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7958408418394948892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/08/export-database-data-to-xls-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7958408418394948892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7958408418394948892'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/08/export-database-data-to-xls-in-php.html' title='Export Database Data to .XLS in PHP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3589750266591654294</id><published>2010-08-05T11:07:00.000+05:30</published><updated>2010-08-05T11:07:46.119+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CI'/><title type='text'>Codeigniter Layout Library</title><content type='html'>Create Layout.php in libraries(/application/libraries/Layout.php) folder and copy the below code in the file&lt;br /&gt;&lt;blockquote&gt;&amp;lt; ?php   if (!defined('BASEPATH')) exit('No direct script access allowed');  class Layout {          var $obj;     var $layout;          function Layout($layout = "layout_main")     {         $this-&amp;gt;obj =&amp;amp; get_instance();&lt;br /&gt;$this-&amp;gt;layout = $layout;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function setLayout($layout)&lt;br /&gt;{&lt;br /&gt;$this-&amp;gt;layout = $layout;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function view($view, $data=null, $return=false)&lt;br /&gt;{&lt;br /&gt;$loadedData = array();&lt;br /&gt;$loadedData['content_for_layout'] = $this-&amp;gt;obj-&amp;gt;load-&amp;gt;view($view,$data,true);&lt;br /&gt;&lt;br /&gt;if($return)&lt;br /&gt;{&lt;br /&gt;$output = $this-&amp;gt;obj-&amp;gt;load-&amp;gt;view($this-&amp;gt;layout, $loadedData, true);&lt;br /&gt;return $output;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;$this-&amp;gt;obj-&amp;gt;load-&amp;gt;view($this-&amp;gt;layout, $loadedData, false);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;? &amp;gt;  &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then load your library in your controller&lt;br /&gt;&lt;br /&gt;You can use it in two ways. First and obvious is to place the following line in the controller’s constructor function. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$this-&gt;load-&gt;library('layout', 'layout_main');  &lt;/blockquote&gt;&lt;br /&gt;The second is by enabling codeIgniter to autoload the library by editing /application/config/autoload.php&lt;br /&gt;&lt;br /&gt;$autoload['libraries'] = array('layout');  &lt;br /&gt;&lt;br /&gt;in your controller you may do this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$this-&gt;layout-&gt;view('welcome_message');&lt;/blockquote&gt;&lt;br /&gt;Master layout&lt;br /&gt;&lt;br /&gt;/application/views/layout_main.php&lt;br /&gt;Your view file must use $content_for_layout. For example:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;?=$title_for_layout?&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="content-type" content="text/html;charset=utf-8" /&amp;gt;&lt;br /&gt;&amp;lt;link rel="stylesheet" href="/css/main.css" type="text/css" /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id="pagewidth" &amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;div id="header" &amp;gt;&amp;lt;img src="/images/header.jpg" width="700" height="200"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;div id="wrapper" class="clearfix" &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="twocols" class="clearfix"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php echo $content_for_layout?&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;div id="footer" &amp;gt; Footer &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3589750266591654294?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3589750266591654294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/08/codeigniter-layout-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3589750266591654294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3589750266591654294'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/08/codeigniter-layout-library.html' title='Codeigniter Layout Library'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8489068857212677578</id><published>2010-08-02T19:59:00.001+05:30</published><updated>2010-08-02T20:01:52.846+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Add JS and CSS files in *.tpl.php in Drupal6</title><content type='html'>function yourtheme_preprocess_node(&amp;$variables) {&lt;br /&gt;if ($your_condition) {&lt;br /&gt;drupal_add_css(path_to_theme(). "/filename.css", "theme");&lt;br /&gt;$variables['styles'] = drupal_get_css();&lt;br /&gt;&lt;br /&gt;drupal_add_js(file_directory_path() .'/javascript.js', 'inline');&lt;br /&gt;$vars['scripts'] = drupal_get_js();&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8489068857212677578?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8489068857212677578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/08/add-js-and-css-files-in-tplphp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8489068857212677578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8489068857212677578'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/08/add-js-and-css-files-in-tplphp.html' title='Add JS and CSS files in *.tpl.php in Drupal6'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-9089894847191230436</id><published>2010-07-26T16:26:00.000+05:30</published><updated>2010-07-26T16:26:14.194+05:30</updated><title type='text'>Install Google Chrome with YUM on Fedora 13, Red Hat</title><content type='html'>Add following to /etc/yum.repos.d/google.repo file:&lt;br /&gt;32-bit&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[google]&lt;br /&gt;name=Google - i386&lt;br /&gt;baseurl=http://dl.google.com/linux/rpm/stable/i386&lt;br /&gt;enabled=1&lt;br /&gt;gpgcheck=1&lt;br /&gt;gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub&lt;/blockquote&gt;&lt;br /&gt;64-bit&lt;br /&gt;&lt;br /&gt;[google64]&lt;br /&gt;name=Google - x86_64&lt;br /&gt;baseurl=http://dl.google.com/linux/rpm/stable/x86_64&lt;br /&gt;enabled=1&lt;br /&gt;gpgcheck=1&lt;br /&gt;gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note: Both 32-bit and 64-bit repos can be placed in the same file.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;## Install Google Chrome Stable version&lt;br /&gt;yum install google-chrome-stable&lt;br /&gt; &lt;br /&gt;## OR install Google Chrome Beta version##&lt;br /&gt;yum install google-chrome-beta&lt;br /&gt; &lt;br /&gt;## OR install Google Chrome Unstable version##&lt;br /&gt;yum install google-chrome-unstable&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-9089894847191230436?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/9089894847191230436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/07/install-google-chrome-with-yum-on.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9089894847191230436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9089894847191230436'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/07/install-google-chrome-with-yum-on.html' title='Install Google Chrome with YUM on Fedora 13, Red Hat'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5901666948028395310</id><published>2010-07-01T12:10:00.004+05:30</published><updated>2010-07-01T12:16:20.626+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Simpletest: submitFormByName</title><content type='html'>The &lt;b&gt;&lt;a href="http://www.simpletest.org/" target="_blank"&gt;SimpleTest PHP unit tester&lt;/a&gt; &lt;/b&gt;and web test framework.It has support for SSL, forms, frames, proxies and basic authentication.    The idea is that common but fiddly PHP tasks, such as logging into a site,    can be tested easily.&lt;br /&gt;&lt;br /&gt;Unfortunately Simpletest doesnot provide a function for submit a form with its Name.But we can implement this function by 3 small changes in 3 different files.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1)browser.php&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this add below code&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;function submitFormByName($name) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (! ($form = &amp;amp;$this-&amp;gt;_page-&amp;gt;getFormByName($name))) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $success = $this-&amp;gt;_load(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $form-&amp;gt;getAction(),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $form-&amp;gt;submit());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ($success ? $this-&amp;gt;getContent() : $success);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2)Page.php&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add below function&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;function &amp;amp;getFormByName($name) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($i = 0; $i &amp;lt; count($this-&amp;gt;_complete_forms); $i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($this-&amp;gt;_complete_forms[$i]-&amp;gt;getName() == $name) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $this-&amp;gt;_complete_forms[$i];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $null = null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3)Form.php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here u have to declare variable caleed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;$this-&amp;gt;_name = $tag-&amp;gt;getAttribute('name');&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in constructor(SimpleForm) then add the function&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;function getName() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $this-&amp;gt;_name;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Thats all. Now you can submit a form with its name also.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5901666948028395310?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5901666948028395310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/07/simpletest-submitformbyname.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5901666948028395310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5901666948028395310'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/07/simpletest-submitformbyname.html' title='Simpletest: submitFormByName'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2252632006710832263</id><published>2010-06-22T17:47:00.001+05:30</published><updated>2010-06-22T17:47:41.454+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Perl: Getting Started</title><content type='html'>Here is the good link for Perl beginners.&lt;br /&gt;&lt;blockquote&gt;&lt;a href="http://www.cgi101.com/book/ch1/text.html" target="_blank"&gt;&lt;br /&gt;http://www.cgi101.com/book/ch1/text.html&lt;/a&gt; &lt;/blockquote&gt;&lt;br /&gt;&amp;nbsp;Perl is a simple, easy to learn language, yet powerful enough to accomplish very difficult and complex tasks. It is widely available, and is probably already installed on your Unix server. You don't need to compile your Perl programs; you simply write your code, save the file, and run it (or have the web server run it). The program itself is a simple text file; the Perl interpreter does all the work. The advantage to this is you can move your program with little or no changes to any machine with a Perl interpreter. The disadvantage is you won't discover any bugs in your program until you run it..............&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2252632006710832263?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2252632006710832263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/perl-getting-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2252632006710832263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2252632006710832263'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/perl-getting-started.html' title='Perl: Getting Started'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5768787641916464863</id><published>2010-06-17T12:30:00.000+05:30</published><updated>2010-06-17T12:30:17.914+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Highlight Search Words</title><content type='html'>&lt;h3&gt;String Manipulation&lt;/h3&gt;&lt;p&gt;This first method will highlight all the occurances of the string and is case sensitive. It uses str_replace to do the required manipulation but has faults in not being able to tell the difference between PHP and PHPRO. It will highlight the text "PHP" and "PHP"RO which may be the desired result.&lt;/p&gt;&lt;div class="codebox"&gt;&lt;code&gt;&lt;span style="color: #000000;"&gt; &lt;br /&gt;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@highlight&amp;nbsp;words&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;string&amp;nbsp;$string&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;array&amp;nbsp;$words&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;string&amp;nbsp;&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;function&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;highlightWords&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&lt;/span&gt;&lt;span style="color: #007700;"&gt;)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;(&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;as&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;str_ireplace&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'&amp;lt;span&amp;nbsp;class="highlight_word"&amp;gt;'&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'&amp;lt;/span&amp;gt;'&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;return&amp;nbsp;the&amp;nbsp;highlighted&amp;nbsp;string&amp;nbsp;***/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;return&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;example&amp;nbsp;usage&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'This&amp;nbsp;text&amp;nbsp;will&amp;nbsp;highlight&amp;nbsp;PHP&amp;nbsp;and&amp;nbsp;SQL&amp;nbsp;and&amp;nbsp;sql&amp;nbsp;but&amp;nbsp;not&amp;nbsp;PHPRO&amp;nbsp;or&amp;nbsp;MySQL&amp;nbsp;or&amp;nbsp;sqlite'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;an&amp;nbsp;array&amp;nbsp;of&amp;nbsp;words&amp;nbsp;to&amp;nbsp;highlight&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;array(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'php'&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'sql'&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;highlight&amp;nbsp;the&amp;nbsp;words&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;highlightWords&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;title&amp;gt;PHPRO&amp;nbsp;Highlight&amp;nbsp;Search&amp;nbsp;Words&amp;lt;/title&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;style&amp;nbsp;type="text/css"&amp;gt;&lt;br /&gt;.highlight_word{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;pink;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt; &lt;/code&gt;&lt;/div&gt;&lt;h3&gt;Regular Expression&lt;/h3&gt;&lt;p&gt;This second method makes us of PHP PCRE to achieve a better result. The seach is case insensitive, which means it will match php and PHP. This method has the added benifit of being able to use word boundries which enables highlighting of the word PHP but not PHPRO. The word boundary prevents partial matching of the search text and of highlighting parts of words. If this is the functionality you require, this is the method to choose.&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color: #000000;"&gt; &lt;br /&gt;&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@highlight&amp;nbsp;words&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;string&amp;nbsp;$text&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@param&amp;nbsp;array&amp;nbsp;$words&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*&amp;nbsp;@return&amp;nbsp;string&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #007700;"&gt;function&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;highlightWords&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$text&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&lt;/span&gt;&lt;span style="color: #007700;"&gt;)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;loop&amp;nbsp;of&amp;nbsp;the&amp;nbsp;array&amp;nbsp;of&amp;nbsp;words&amp;nbsp;***/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;foreach&amp;nbsp;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;as&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&lt;/span&gt;&lt;span style="color: #007700;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;quote&amp;nbsp;the&amp;nbsp;text&amp;nbsp;for&amp;nbsp;regex&amp;nbsp;***/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;preg_quote&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;highlight&amp;nbsp;the&amp;nbsp;words&amp;nbsp;***/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$text&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;preg_replace&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;"/\b(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$word&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;)\b/i"&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'&amp;lt;span&amp;nbsp;class="highlight_word"&amp;gt;\1&amp;lt;/span&amp;gt;'&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$text&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;return&amp;nbsp;the&amp;nbsp;text&amp;nbsp;***/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;return&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$text&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;example&amp;nbsp;usage&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'This&amp;nbsp;text&amp;nbsp;will&amp;nbsp;highlight&amp;nbsp;PHP&amp;nbsp;and&amp;nbsp;SQL&amp;nbsp;and&amp;nbsp;sql&amp;nbsp;but&amp;nbsp;not&amp;nbsp;PHPRO&amp;nbsp;or&amp;nbsp;MySQL&amp;nbsp;or&amp;nbsp;sqlite'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;an&amp;nbsp;array&amp;nbsp;of&amp;nbsp;words&amp;nbsp;to&amp;nbsp;highlight&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;array(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'php'&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'sql'&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;highlight&amp;nbsp;the&amp;nbsp;words&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;highlightWords&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$words&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;PHPRO&amp;nbsp;Highlight&amp;nbsp;Search&amp;nbsp;Words&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;style&amp;nbsp;type="text/css"&amp;gt;&lt;br /&gt;.highlight_word{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;pink;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$string&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5768787641916464863?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5768787641916464863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/highlight-search-words.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5768787641916464863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5768787641916464863'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/highlight-search-words.html' title='Highlight Search Words'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7862271887960304278</id><published>2010-06-17T11:55:00.002+05:30</published><updated>2011-12-28T21:45:49.965+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>50+ PHP optimisation tips</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;&amp;nbsp;echo&lt;/i&gt; is faster than &lt;i&gt;print&lt;/i&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Wrap your string in single quotes (‘) instead of double quotes (“) is faster because PHP searches for variables inside “…” and not in ‘…’, use this when you’re not using variables you need evaluating in your string.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use sprintf instead of variables contained in double quotes, it’s about 10x faster.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use echo’s multiple parameters (or stacked) instead of string concatenation.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use pre-calculations, set the maximum value for your for-loops before and not in the loop. ie: for ($x=0; $x &amp;lt; count($array); $x), this calls the count() function each time, use $max=count($array) instead before the for-loop starts. &lt;/li&gt;&lt;li&gt;Unset or null your variables to free memory, especially large arrays.&lt;/li&gt;&lt;li&gt;Avoid magic like __get, __set, __autoload.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use require() instead of require_once() where possible.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use full paths in includes and requires, less time spent on resolving the OS paths.&amp;nbsp;&lt;/li&gt;&lt;li&gt;require() and include() are identical in every way except require halts if the file is missing. Performance wise there is very little difference.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Since PHP5, the time of when the script started executing can be found in $_SERVER[’REQUEST_TIME’], use this instead of time() or microtime().&amp;nbsp;&lt;/li&gt;&lt;li&gt;PCRE regex is quicker than EREG, but always see if you can use quicker native functions such as &lt;a href="http://www.php.net/strncasecmp"&gt;strncasecmp&lt;/a&gt;, &lt;a href="http://www.php.net/strpbrk"&gt;strpbrk&lt;/a&gt; and &lt;a href="http://www.php.net/stripos"&gt;stripos&lt;/a&gt; instead. &lt;a href="http://talks.php.net/show/php-best-practices/36"&gt;[Citation]&lt;/a&gt;&lt;/li&gt;&lt;li&gt;When parsing with XML in PHP try xml2array, which makes use of the &lt;a href="http://www.php.net/xml"&gt;PHP XML functions&lt;/a&gt;, for HTML you can try PHP’s &lt;a href="http://www.php.net/dom"&gt;DOM document&lt;/a&gt; or &lt;a href="http://www.php.net/domxml"&gt;DOM XML&lt;/a&gt; in PHP4.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/str_replace"&gt;str_replace&lt;/a&gt; is faster than &lt;a href="http://www.php.net/preg_replace"&gt;preg_replace&lt;/a&gt;, str_replace is best overall, however &lt;a href="http://www.php.net/strtr"&gt;strtr&lt;/a&gt; is sometimes quicker with larger strings. Using array() inside str_replace is usually quicker than multiple str_replace.&amp;nbsp;&lt;/li&gt;&lt;li&gt;“else if” statements are faster than &lt;a href="http://en.wikipedia.org/wiki/Switch_statement"&gt;select statements&lt;/a&gt; aka &lt;a href="http://www.php.net/switch"&gt;case/switch&lt;/a&gt;. &lt;/li&gt;&lt;li&gt;Error suppression with @ is very slow. &lt;/li&gt;&lt;li&gt;To reduce bandwidth usage turn on mod_deflate in Apache v2&amp;nbsp;&lt;a href="http://howtoforge.com/apache2_mod_deflate"&gt;&lt;/a&gt; or for Apache v1 try mod_gzip.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Close your database connections when you’re done with them.&amp;nbsp;&lt;/li&gt;&lt;li&gt;$row[’id’] is 7 times faster than $row[id], because if you don’t supply quotes it has to guess which index you meant, assuming you didn’t mean a constant.&lt;/li&gt;&lt;li&gt;Use  tags when declaring PHP as all other styles are depreciated, including short tags.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use strict code, avoid suppressing errors, notices and warnings thus resulting in cleaner code and less overheads. Consider having &lt;a href="http://www.php.net/error_reporting"&gt;error_reporting(E_ALL)&lt;/a&gt; always on.&lt;/li&gt;&lt;li&gt;PHP scripts are be served at 2-10 times slower by Apache httpd than a static page. Try to use static pages instead of server side scripts.&lt;/li&gt;&lt;li&gt;PHP scripts (unless cached) are compiled on the fly every time you call them. Install a PHP caching product (such as &lt;a href="http://www.php.net/memcache"&gt;memcached&lt;/a&gt; or &lt;a href="http://eaccelerator.net/"&gt;eAccelerator&lt;/a&gt; or &lt;a href="http://sourceforge.net/projects/turck-mmcache/"&gt;Turck MMCache&lt;/a&gt;) to typically increase performance by 25-100% by removing compile times. You can even &lt;a href="http://www.cpanel.net/support/docs/ea/ea3/ea3php_php_extensionmgr.html"&gt;setup eAccelerator on cPanel using EasyApache3&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;An alternative caching technique when you have pages that don’t change too frequently is to cache the HTML output of your PHP pages. Try &lt;a href="http://smarty.php.net/"&gt;Smarty&lt;/a&gt; or &lt;a href="http://pear.php.net/Cache_Lite"&gt;Cache Lite&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Use isset where possible in replace of strlen. (ie: if (strlen($foo) &amp;lt; 5) { echo “Foo is too short”; } vs. if (!isset($foo{5})) { echo “Foo is too short”; } ).&amp;nbsp;&lt;/li&gt;&lt;li&gt;++$i is faster than $ i++, so use pre-increment where possible. &lt;/li&gt;&lt;li&gt;Make use of the countless predefined functions of PHP, don’t attempt to build your own as the native ones will be far quicker; if you have very time and resource consuming functions, consider writing them as C extensions or modules.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Profile your code. A profiler shows you, which parts of your code consumes how many time. The &lt;a href="http://xdebug.org/"&gt;Xdebug debugger&lt;/a&gt; already contains a profiler. Profiling shows you the bottlenecks in overview.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Document your code.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Learn the difference between good and bad code.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Stick to coding standards, it will make it easier for you to understand other people’s code and other people will be able to understand yours.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Separate code, content and presentation: keep your PHP code separate from your HTML.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Don’t bother using complex template systems such as Smarty, use the one that’s included in PHP already, see &lt;a href="http://www.php.net/ob_get_contents"&gt;ob_get_contents&lt;/a&gt; and &lt;a href="http://www.php.net/extract"&gt;extract&lt;/a&gt;, and simply pull the data from your database.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Never trust variables coming from user land (such as from $_POST) use &lt;a href="http://www.php.net/mysql_real_escape_string"&gt;mysql_real_escape_string&lt;/a&gt; when using mysql, and &lt;a href="http://www.php.net/htmlspecialchars"&gt;htmlspecialchars&lt;/a&gt; when outputting as HTML. &lt;/li&gt;&lt;li&gt;For security reasons never have anything that could expose information about paths, extensions and configuration, such as display_errors or &lt;a href="http://www.php.net/phpinfo"&gt;phpinfo&lt;/a&gt;() in your webroot.&lt;/li&gt;&lt;li&gt;Turn off &lt;a href="http://www.php.net/register_globals"&gt;register_globals&lt;/a&gt; (it’s disabled by default for a reason!). No script at production level should need this enabled as it is a security risk. Fix any scripts that require it on, and fix any scripts that require it off using &lt;a href="http://uk.php.net/manual/en/security.globals.php#82542"&gt;unregister_globals()&lt;/a&gt;. Do this now, as it’s set to be removed in PHP6.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Avoid using plain text when storing and evaluating passwords to avoid exposure, instead use a hash, such as an &lt;a href="http://www.php.net/md5"&gt;md5&lt;/a&gt; hash. &lt;/li&gt;&lt;li&gt;Use &lt;a href="http://www.php.net/ip2long"&gt;ip2long&lt;/a&gt;() and &lt;a href="http://www.php.net/long2ip"&gt;long2ip&lt;/a&gt;() to store IP addresses as integers instead of strings.&lt;/li&gt;&lt;li&gt;You can avoid reinventing the wheel by using the PEAR project, giving you existing code of a high standard.&amp;nbsp;&lt;/li&gt;&lt;li&gt;When using header(‘Location: ‘.$url); remember to follow it with a die(); as the script continues to run even though the location has changed or avoid using it all together where possible.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In &lt;a href="http://www.php.net/oop"&gt;OOP&lt;/a&gt;, if a method can be a &lt;a href="http://en.wikipedia.org/wiki/Method_%28computer_science%29#Static_methods"&gt;static method&lt;/a&gt;, declare it static. Speed improvement is by a factor of 4.&amp;nbsp;&lt;a href="http://ilia.ws/files/frankfurt_perf.pdf"&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Incrementing a local variable in an OOP method is the fastest. Nearly the same as calling a local variable in a function and incrementing a global variable is 2 times slow than a local variable.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Incrementing an object property (eg. $this-&amp;gt;prop++) is 3 times slower than a local variable.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Just declaring a global variable without using it in a function slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Methods in derived classes run faster than ones defined in the base class.&amp;nbsp;&lt;/li&gt;&lt;li&gt;A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.&lt;/li&gt;&lt;li&gt;Not everything has to be OOP, often it is just overhead, each method and object call consumes a lot of memory.&lt;/li&gt;&lt;li&gt;Never trust user data, escape your strings that you use in SQL queries using &lt;a href="http://www.php.net/mysql_real_escape_string"&gt;mysql_real_escape_string&lt;/a&gt;, instead of mysql_escape_string or addslashes. Also note that if &lt;a href="http://www.php.net/magic_quotes_gpc"&gt;magic_quotes_gpc&lt;/a&gt; is enabled you should use &lt;a href="http://www.php.net/stripslashes"&gt;stripslashes&lt;/a&gt; first. &lt;/li&gt;&lt;li&gt;Avoid the PHP mail() function header injection issue. &lt;/li&gt;&lt;li&gt;Unset your database variables (the password at a minimum), you shouldn’t need it after you make the database connection.&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/RTFM"&gt;RTFM!&lt;/a&gt; PHP offers a &lt;a href="http://www.php.net/manual/"&gt;fantastic manual&lt;/a&gt;, possibly one of the best out there, which makes it a very hands on language, providing working examples and talking in plain English. Please USE IT!&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h3 style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: 16px; margin-bottom: 0px; text-align: -webkit-auto;"&gt;Avoid doing SQL queries within a loop:&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we writing a sql queries inside the Loop, it&amp;nbsp;&lt;span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: x-small; line-height: 16px; text-align: -webkit-auto;"&gt;results in multiple round trips to the database, and significantly slower scripts. In the example below, you can change the loop to build a single SQL query and insert all of your users at once. Below is the example to create sql query in loop:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: x-small; line-height: 16px; text-align: -webkit-auto;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: x-small; line-height: 16px; text-align: -webkit-auto;"&gt;&lt;b&gt;&lt;span style="color: #38761d;"&gt;&lt;div&gt;&lt;div&gt;$Data = array();&lt;/div&gt;&lt;div&gt;foreach ($resultSet as $result) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; $Data[] = '("' . $result['first_name'] . '", "' . $result['last_name'] . '")';&lt;/div&gt;&lt;div&gt;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;$query = 'INSERT INTO table_name (first_name,last_name) VALUES' . implode(',', $Data);&lt;/div&gt;&lt;div&gt;mysql_query($query);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Here’s a short list of cool features that might have slipped under your radar as well:&lt;br /&gt;&lt;ol&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Use &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/function.ip2long.php"&gt;ip2long&lt;/a&gt;()&lt;/em&gt; and &lt;em&gt;&lt;a href="http://www.rightbrainnetworks.com/blog/10-things-you-probably-didnt-know-about-php/"&gt;long2ip&lt;/a&gt;()&lt;/em&gt; to store IP addresses as integers instead of strings in a database.&lt;/strong&gt; This will reduce the storage space by almost a factor of four (15 bytes for char(15) vs. 4 bytes for the integer), make it easier to calculate whether a certain address falls within a range, and speed-up searches and sorts (sometimes by quite a bit).&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Partially validate email addresses by checking that the domain name exists with &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/function.checkdnsrr.php"&gt;checkdnsrr&lt;/a&gt;()&lt;/em&gt;.&lt;/strong&gt; This built-in function checks to ensure that a specified domain name resolves to an IP address. A simple user-defined function that builds on checkdnsrr() to partially valid email addresses can be found in the &lt;a href="http://us3.php.net/manual/en/function.checkdnsrr.php#48157"&gt;user comments&lt;/a&gt; section in the PHP docs. This is handy for catching those occasional folks who think their email address is ‘joeuser@wwwphp.net’ instead of ‘joeuser@php.net’.&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;If you’re using PHP 5 with MySQL 4.1 or above, consider ditching the &lt;em&gt;mysql_*&lt;/em&gt; functions for the improved &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/ref.mysqli.php"&gt;mysqli_*&lt;/a&gt;&lt;/em&gt; functions.&lt;/strong&gt; One nice feature is that you can use &lt;a href="http://us3.php.net/mysqli_stmt_prepare"&gt;prepared statements&lt;/a&gt;, which may speed up queries if you maintain a database-intensive website. &lt;a href="http://www.johnjawed.com/benchmarks/"&gt;Some benchmarks&lt;/a&gt;.&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Learn to love the &lt;a href="http://us3.php.net/language.operators.comparison#language.operators.comparison.ternary"&gt;ternary operator&lt;/a&gt;&lt;/strong&gt;. &lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;If you get the feeling that you might be reinventing the wheel during a project, check &lt;a href="http://pear.php.net/"&gt;&lt;em&gt;PEAR&lt;/em&gt;&lt;/a&gt; before you write another line.&lt;/strong&gt; PEAR is a great resource that many PHP developers are aware of, yet many more are not. It’s an online repository containing over 400 reusable snippets that can be dropped right into your PHP application. Unless your project is trully unique, you ought to be able to find a PEAR package that saves at least a little time. (Also see &lt;a href="http://pecl.php.net/"&gt;PECL&lt;/a&gt;)&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Automatically print a nicely formatted copy of a page’s source code with &lt;a href="http://us3.php.net/manual/en/function.highlight-file.php"&gt;highlight_file&lt;/a&gt;().&lt;/strong&gt;This function is handy for when you need to ask for some assistance with a script in a messageboard, IRC, etc. Obviously, some care must be taken not to accidently show your source when it contains DB connection information, passwords, etc.&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Prevent potentially sensitive error messages from being shown to users with the &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/function.error-reporting.php"&gt;error_reporting(0)&lt;/a&gt;&lt;/em&gt; function.&lt;/strong&gt; Ideally error reporting should be completely disabled on a production server from within &lt;em&gt;php.ini&lt;/em&gt;. However if you’re on a shared webhost and you aren’t given your own &lt;em&gt;php.ini&lt;/em&gt;, then your best bet is to add &lt;em&gt;error_reporting(0);&lt;/em&gt; as the first line in each of your scripts (or use it with &lt;a href="http://us3.php.net/manual/en/function.require-once.php"&gt;require_once()&lt;/a&gt;.) This will prevent potentially sensitive SQL queries and path names from being displayed if things go awry.&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Use &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/function.gzcompress.php"&gt;gzcompress&lt;/a&gt;()&lt;/em&gt; and &lt;em&gt;&lt;a href="http://us3.php.net/manual/en/function.gzuncompress.php"&gt;gzuncompress&lt;/a&gt;()&lt;/em&gt; to transparently compress/decompress large strings before storing them in a database.&lt;/strong&gt; These built-in functions use the gzip algorithm and can compress plaintext up to 90%. I use these functions almost everytime I read/write to a &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/blob.html"&gt;BLOB&lt;/a&gt; field within PHP. The only exception is when I need full text indexing capabilities.&lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Return multiple values from a function with “&lt;a href="http://us3.php.net/manual/en/functions.arguments.php#functions.arguments.by-reference"&gt;by reference&lt;/a&gt;” parameters.&lt;/strong&gt; Like the ternary operator, most PHP developers who come from a more formalized programming background already know this one. However, those who’s background is more HTML than Pascal, probably have wondered at one time “how do I get multiple values back from a function I wrote, even though I can only use one &lt;em&gt;return&lt;/em&gt; value?” The answer is that you precede a variable with “&amp;amp;” and use it “by reference” instead of “by value”. &lt;/li&gt;&lt;li style="margin-top: 0.6em;"&gt;&lt;strong&gt;Fully understand “&lt;a href="http://us3.php.net/manual/en/security.magicquotes.php"&gt;magic quotes&lt;/a&gt;” and the dangers of &lt;a href="http://en.wikipedia.org/wiki/SQL_injection"&gt;SQL injection&lt;/a&gt;.&lt;/strong&gt; I’m hoping that most developers reading this are already familiar with SQL injection. However, I list it here because it’s absolutely critical to understand. If you’ve never heard the term before, spend the entire rest of the day googling and reading.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7862271887960304278?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7862271887960304278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/echo-is-faster-than-print.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7862271887960304278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7862271887960304278'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/echo-is-faster-than-print.html' title='50+ PHP optimisation tips'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4679323230173325793</id><published>2010-06-17T11:06:00.003+05:30</published><updated>2010-06-17T11:09:07.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Embedding PHP In CSS</title><content type='html'>Perhaps one of the most frustrating aspects of using PHP with websites, is getting variables into CSS. Having variables stored in an ini file, config file or even a database can make the updating of the look and feel of a site simple, however, CSS files, by default, do not parse PHP. Of course, the web server could be told to parse CSS as PHP in the same way it does for HTML.&lt;br /&gt;&lt;div class="displaybox"&gt;&lt;blockquote&gt;&lt;b&gt;AddType application/x-httpd-php .css&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;With the addition of the above line in httpd.conf or in a .htaccess, the web server will now parse PHP code that is within the CSS files. This is one solution, but a better method may be at hand.&lt;br /&gt;A html file may also include a PHP file, in the same manner as it includes a CSS file. This means the stylesheet can be renamed from style.css to style.php. When included from within the head of the HTML document, the link will look like this.&lt;br /&gt;&lt;div class="displaybox"&gt;&amp;lt;link rel="stylesheet" href="style.php" media="screen"&amp;gt;&lt;/div&gt;With the link to the style.php file in place, the PHP within the stylesheet is just a normal PHP file.&lt;br /&gt;&lt;div class="codebox"&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;br /&gt;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;set&amp;nbsp;the&amp;nbsp;content&amp;nbsp;type&amp;nbsp;header&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;header&lt;/span&gt;&lt;span style="color: #007700;"&gt;(&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;"Content-type:&amp;nbsp;text/css"&lt;/span&gt;&lt;span style="color: #007700;"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/**&amp;nbsp;set&amp;nbsp;the&amp;nbsp;paragraph&amp;nbsp;color&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$para_color&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'#0000ff'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;set&amp;nbsp;the&amp;nbsp;heading&amp;nbsp;size&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$heading_size&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'2em'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;/***&amp;nbsp;set&amp;nbsp;the&amp;nbsp;heading&amp;nbsp;color&amp;nbsp;***/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$heading_color&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'#c0c0c0'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;p{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color:&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$para_color&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-weight:&amp;nbsp;bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size:&amp;nbsp;1.2em;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align:&amp;nbsp;left;&lt;br /&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;h1{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color:&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$heading_color&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size&amp;nbsp;=&amp;nbsp;&lt;span style="color: #0000bb;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$heading_size&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;?&amp;gt;&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align:&amp;nbsp;centre;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/code&gt;&lt;/div&gt;The PHP code within the style sheet is embedded just as it would be when using HTML and PHP together in a any php file. Each of the variables are declared at the top of the script, and the values then used where appropriate. Of course, the variables could be stored in a config file or database to make changes to the styles easy from remote locations.&lt;br /&gt;The code above will produce a Cascading Style Sheet as follows:&lt;br /&gt;&lt;div class="displaybox"&gt;&lt;pre&gt;p{&lt;br /&gt;color: #0000ff;&lt;br /&gt;font-weight: bold;&lt;br /&gt;font-size: 1.2em;&lt;br /&gt;text-align: left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;h1{&lt;br /&gt;color: #c0c0c0;&lt;br /&gt;font-size = 2em;&lt;br /&gt;text-align: centre;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;An addition to CSS is pending that will permit the use of CSS variables, however, this does not exclude the of PHP to get a variable into the CSS file itself. The proposed CSS variables would look like this, and allow the defining of a variable in a @variable at-rule and then be able to use that variable through-out the style sheet.&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;foo&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;style&amp;nbsp;type="text/css"&amp;gt;&lt;br /&gt;@variables&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;LogoBGColor:&amp;nbsp;#e0e0e0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;div.logoContainer&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;var(LogoBGColor);&lt;br /&gt;&amp;nbsp;&amp;nbsp;color:&amp;nbsp;red;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;nbsp;class="heading"&amp;gt;CSS&amp;nbsp;Variables&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;div&amp;nbsp;class="logoContainer"&amp;gt;&lt;br /&gt;This&amp;nbsp;is&amp;nbsp;some&amp;nbsp;Text&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4679323230173325793?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4679323230173325793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/embedding-php-in-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4679323230173325793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4679323230173325793'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/embedding-php-in-css.html' title='Embedding PHP In CSS'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3675004021810404443</id><published>2010-06-16T20:11:00.001+05:30</published><updated>2010-06-16T20:13:13.042+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Run Script From Cron</title><content type='html'>The cron man page defines cron as a "daemon to execute scheduled commands". This means you can run scripts every hour, or every day, or on the 13 of every month at 5:38am. Here is an example of a cron entry. &lt;br /&gt;&lt;blockquote style="color: red;"&gt;&lt;div class="displaybox"&gt;&lt;b&gt;00 18 * * * /path/to/command &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;In a few short minutes you will understand what this command means. &lt;br /&gt;&lt;h2&gt;&lt;a class="anchor" href="http://draft.blogger.com/post-edit.g?blogID=2723064088198962914&amp;amp;postID=3675004021810404443" name="3"&gt;Structure&lt;/a&gt;&lt;/h2&gt;The structure of a cron entry as seen above is quite simple when broken down. In the above entry there is five sections and a path to a PHP script. Here is how it breaks down &lt;br /&gt;Minute  Hour  Day  Month  Day  Command  &lt;br /&gt;Lets break it down further..  &lt;br /&gt;&lt;dl&gt;&lt;dt&gt;Minute&lt;/dt&gt;&lt;dd&gt;Minute of the hour, 00 to 59&lt;/dd&gt;&lt;dt&gt;Hour&lt;/dt&gt;&lt;dd&gt;Hour of the day in 24-hour format, 00 to 23&lt;/dd&gt;&lt;dt&gt;Day&lt;/dt&gt;&lt;dd&gt;Day of the month, 1 to 31&lt;/dd&gt;&lt;dt&gt;Month&lt;/dt&gt;&lt;dd&gt;Month of the year, 1 to 12&lt;/dd&gt;&lt;dt&gt;DayDay of week&lt;/dt&gt;&lt;dd&gt;3 chars - sun, mon, tue, or numeric (0=sun, 1=mon etc)&lt;/dd&gt;&lt;dd&gt;Command = The command you want to execute &lt;/dd&gt;The time is in twenty four hour time. So you may have guessed already that the 00 is the minutes and the 18 above is 6:00pm. The asterix character &lt;span class="codechar"&gt;*&lt;/span&gt; is a wild card and means every. That is, every minute or every day, or every month. This means the script.php script would be executed every day of every month.  &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;00 18 * * * /path/to/script.php &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;&lt;h2&gt;&lt;a class="anchor" href="http://draft.blogger.com/post-edit.g?blogID=2723064088198962914&amp;amp;postID=3675004021810404443" name="4"&gt;Crontab&lt;/a&gt;&lt;/h2&gt;The crontab is the command used to interface with cron. Within crontab command can be entered, editted or deleted. To enter into the crontab simply type:   &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;crontab -e &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;This command will bring you to a vi console where you can create your cron entries. All the same rules that apply to vi apply in the editor. It is important to follow the examples here by using absolute paths to the script that is to be executed. This is because crontab does not have access to the system $PATH, so any system command also need have thier full path also. The path to a system command can be aquired using the which command. The $PATH is not available within cron, however, the $HOME variable is, so that when we need to execute a command or script from our home directory, this is available to us.   &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;#which&lt;/b&gt;&lt;br /&gt;&lt;b&gt;mail /bin/mail &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;&lt;h2&gt;&lt;a class="anchor" href="http://draft.blogger.com/post-edit.g?blogID=2723064088198962914&amp;amp;postID=3675004021810404443" name="5"&gt;Set Crontab Editor&lt;/a&gt;&lt;/h2&gt;It is hard to imagine, yet there are still people out there who do not use vi(m). On most unix and unix like systems vi(m) is the default editor for crontab. This means when you type "crontab -e" at the command prompt, the crontab file is opened in vi(m). To alter this behaviour, the default editor can be changed or exported with the export command. Shown here is an example of changing the default crontab editor to joe.   &lt;/dl&gt;&lt;blockquote style="color: red;"&gt;&lt;div class="displaybox"&gt;&lt;b&gt;export EDITOR=joe &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;&lt;h2&gt;&lt;a class="anchor" href="http://draft.blogger.com/post-edit.g?blogID=2723064088198962914&amp;amp;postID=3675004021810404443" name="6"&gt;Examples&lt;/a&gt;&lt;/h2&gt;We saw above how a script could be run at 6:00pm every night. But what is a script needs to be executed every 5 minutes. We could do something like this.   &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox"&gt;&lt;b style="color: red;"&gt;0 ,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/comman&lt;/b&gt;d &lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;This example shows how the time increments are seperated by a space, but we can have multiple values seperated by comma's. Of course, this is a lot to type out, so cron has a little shortcut syntax to achieve the same result.   &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;*/5 * * * * /path/to/command &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;The previous examples show how to run every day or every whatever. But what if we wish to run a PHP script at 4:00am each Friday just before we go home.   &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;00 16 * * fri /usr/local/bin/php $HOME/script.php &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;The above cron entry will shows 4:00pm every Friday (fri) and will execute the command /usr/local/bin/php $HOME/script.php. Note the use of the $HOME variable to show that the script.php file to be executed is within the users home directory. The path to the php executable however, must be an absolute path.   There is more to cron than these simple demonstrations have shown. It is hoped that this is enough to get you up and scheduling tasks with the cron and the crontab.  Just remember the sequence of times - Minute Hour Day Month Day Command     &lt;h2&gt;&lt;a class="anchor" href="http://draft.blogger.com/post-edit.g?blogID=2723064088198962914&amp;amp;postID=3675004021810404443" name="7"&gt;Backup MySQL Database With Cron&lt;/a&gt;&lt;/h2&gt;Database backup are a frequently performed task, usually a webmaster will begin this process after losing their data and realise that this needs to be done on a regular basis. This is an ideal situation where cron can be used.  Database backups should be stored by date. That is, the filename of the SQL dump should be &lt;database_name&gt;.todays_date.sql so a backup can be made from a given time and/or date. to achieve this, enter the following command in crontab &lt;/database_name&gt;  &lt;/dl&gt;&lt;blockquote&gt;&lt;div class="displaybox" style="color: red;"&gt;&lt;b&gt;0 2 * * * /usr/local/bin/mysqldump -db_user -db_password db_name &amp;gt; /home/www/backups/dbname-`date +\%s`.sql &lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;dl&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3675004021810404443?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3675004021810404443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/run-script-from-cron_16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3675004021810404443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3675004021810404443'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/run-script-from-cron_16.html' title='Run Script From Cron'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6031038353669156973</id><published>2010-06-14T10:53:00.000+05:30</published><updated>2010-06-14T10:53:55.370+05:30</updated><title type='text'>Drupal6 Updates</title><content type='html'>Here is the Drupal6 features from Changelog.txt &lt;br /&gt;&lt;br /&gt;- New, faster and better menu system.&lt;br /&gt;- New watchdog as a hook functionality.&lt;br /&gt;* New hook_watchdog that can be implemented by any module to route log&lt;br /&gt;messages to various destinations.&lt;br /&gt;* Expands the severity levels from 3 (Error, Warning, Notice) to the 8&lt;br /&gt;levels defined in RFC 3164.&lt;br /&gt;* The watchdog module is now called dblog, and is optional, but enabled by&lt;br /&gt;default in the default install profile.&lt;br /&gt;* Extended the database log module so log messages can be filtered.&lt;br /&gt;* Added syslog module: useful for monitoring large Drupal installations.&lt;br /&gt;- Added optional e-mail notifications when users are approved, blocked, or&lt;br /&gt;deleted.&lt;br /&gt;- Drupal works with error reporting set to E_ALL.&lt;br /&gt;- Added scripts/drupal.sh to execute Drupal code from the command line. Useful&lt;br /&gt;to use Drupal as a framework to build command-line tools.&lt;br /&gt;- Made signature support optional and made it possible to theme signatures.&lt;br /&gt;- Made it possible to filter the URL aliases on the URL alias administration&lt;br /&gt;screen.&lt;br /&gt;- Language system improvements:&lt;br /&gt;* Support for right to left languages.&lt;br /&gt;* Language detection based on parts of the URL.&lt;br /&gt;* Browser based language detection.&lt;br /&gt;* Made it possible to specify a node's language.&lt;br /&gt;* Support for translating posts on the site to different languages.&lt;br /&gt;* Language dependent path aliases.&lt;br /&gt;* Automatically import translations when adding a new language.&lt;br /&gt;* JavaScript interface translation.&lt;br /&gt;* Automatically import a module's translation upon enabling that module.&lt;br /&gt;- Moved "PHP input filter" to a standalone module so it can be deleted for&lt;br /&gt;security reasons.&lt;br /&gt;- Usability:&lt;br /&gt;* Improved handling of teasers in posts.&lt;br /&gt;* Added sticky table headers.&lt;br /&gt;* Check for clean URL support automatically with JavaScript.&lt;br /&gt;* Removed default/settings.php. Instead the installer will create it from&lt;br /&gt;default.settings.php.&lt;br /&gt;* Made it possible to configure your own date formats.&lt;br /&gt;* Remember anonymous comment posters.&lt;br /&gt;* Only allow modules and themes to be enabled that have explicitly been&lt;br /&gt;ported to the correct core API version.&lt;br /&gt;* Can now specify the minimum PHP version required for a module within the&lt;br /&gt;.info file.&lt;br /&gt;* Drupal core no longer requires CREATE TEMPORARY TABLES or LOCK TABLES&lt;br /&gt;database rights.&lt;br /&gt;* Dynamically check password strength and confirmation.&lt;br /&gt;* Refactored poll administration.&lt;br /&gt;* Implemented drag-and-drop positioning for blocks, menu items, taxonomy&lt;br /&gt;vocabularies and terms, forums, profile fields, and input format filters.&lt;br /&gt;- Theme system:&lt;br /&gt;* Added .info files to themes and made it easier to specify regions and&lt;br /&gt;features.&lt;br /&gt;* Added theme registry: modules can directly provide .tpl.php files for&lt;br /&gt;their themes without having to create theme_ functions.&lt;br /&gt;* Used the Garland theme for the installation and maintenance pages.&lt;br /&gt;* Added theme preprocess functions for themes that are templates.&lt;br /&gt;* Added support for themeable functions in JavaScript.&lt;br /&gt;- Refactored update.php to a generic batch API to be able to run time-consuming&lt;br /&gt;operations in multiple subsequent HTTP requests.&lt;br /&gt;- Installer:&lt;br /&gt;* Themed the installer with the Garland theme.&lt;br /&gt;* Added form to provide initial site information during installation.&lt;br /&gt;* Added ability to provide extra installation steps programmatically.&lt;br /&gt;* Made it possible to import interface translations at install time.&lt;br /&gt;- Added the HTML corrector filter:&lt;br /&gt;* Fixes faulty and chopped off HTML in postings.&lt;br /&gt;* Tags are now automatically closed at the end of the teaser.&lt;br /&gt;- Performance:&lt;br /&gt;* Made it easier to conditionally load .include files and split up many core&lt;br /&gt;modules.&lt;br /&gt;* Added a JavaScript aggregator.&lt;br /&gt;* Added block-level caching, improving performance for both authenticated&lt;br /&gt;and anonymous users.&lt;br /&gt;* Made Drupal work correctly when running behind a reverse proxy like&lt;br /&gt;Squid or Pound.&lt;br /&gt;- File handling improvements:&lt;br /&gt;* Entries in the files table are now keyed to a user instead of a node.&lt;br /&gt;* Added reusable validation functions to check for uploaded file sizes,&lt;br /&gt;extensions, and image resolution.&lt;br /&gt;* Added ability to create and remove temporary files during a cron job.&lt;br /&gt;- Forum improvements:&lt;br /&gt;* Any node type may now be posted in a forum.&lt;br /&gt;- Taxonomy improvements:&lt;br /&gt;* Descriptions for terms are now shown on taxonomy/term pages as well&lt;br /&gt;as RSS feeds.&lt;br /&gt;* Added versioning support to categories by associating them with node&lt;br /&gt;revisions.&lt;br /&gt;- Added support for OpenID.&lt;br /&gt;- Added support for triggering configurable actions.&lt;br /&gt;- Added the Update status module to automatically check for available updates&lt;br /&gt;and warn sites if they are missing security updates or newer versions.&lt;br /&gt;Sites deploying from CVS should use http://drupal.org/project/cvs_deploy.&lt;br /&gt;Advanced settings provided by http://drupal.org/project/update_advanced.&lt;br /&gt;- Upgraded the core JavaScript library to jQuery version 1.2.3.&lt;br /&gt;- Added a new Schema API, which provides built-in support for core and&lt;br /&gt;contributed modules to work with databases other than MySQL.&lt;br /&gt;- Removed drupal.module. The functionality lives on as the Site network&lt;br /&gt;contributed module (http://drupal.org/project/site_network).&lt;br /&gt;- Removed old system updates. Updates from Drupal versions prior to 5.x will&lt;br /&gt;require upgrading to 5.x before upgrading to 6.x.&lt;br /&gt;&lt;br /&gt;- Better performance because of better caching and the ability to split modules in separate files to reduce memory on runtime&lt;br /&gt;- Improved menu and forms API&lt;br /&gt;- Built-in module update tracker&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;&lt;b&gt;HOOKS&lt;/b&gt;&lt;br /&gt;Drupal's module system is based on the concept of "hooks". A hook is a PHP function that is named foo_bar(), where "foo" is the name of the module (whose filename is thus foo.module) and "bar" is the name of the hook. Each hook has a defined set of parameters and a specified result type.&lt;br /&gt;&lt;br /&gt;To extend Drupal, a module need simply implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and call that hook in all enabled modules that implement it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6031038353669156973?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6031038353669156973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/drupal6-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6031038353669156973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6031038353669156973'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/drupal6-updates.html' title='Drupal6 Updates'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3261044500735349521</id><published>2010-06-11T20:11:00.001+05:30</published><updated>2010-06-14T10:51:16.329+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Magic Methods in PHP</title><content type='html'>With &lt;b&gt;PHP 5&lt;/b&gt; Object Oriented Programming seems to becoming a reality in PHP but we all know that in PHP a variable can take any form depending on the data passed to it. Also PHP automatically creates variable and assigns values to it even is the variables are not defined. But in Object Oriented Programming all the data members/methods needs to be defined. To solve some of these problems in OOPS environment magic methods have been introduced in PHP5.&lt;br /&gt;&lt;span id="more-95"&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;NOTE ON MAGIC METHODS:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Magic methods are the members functions that is available to all the instance of class&lt;/li&gt;&lt;li&gt;Magic methods always starts with “__”. Eg. __construct&lt;/li&gt;&lt;li&gt;All magic methods needs to be declared as public&lt;/li&gt;&lt;li&gt;To use magic method they should be defined within the class  or program scope&lt;/li&gt;&lt;/ul&gt;Various Magic Methods used in PHP 5 are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;__construct()&lt;/li&gt;&lt;li&gt;__destruct()&lt;/li&gt;&lt;li&gt;__set()&lt;/li&gt;&lt;li&gt;__get()&lt;/li&gt;&lt;li&gt;__call()&lt;/li&gt;&lt;li&gt;__toString()&lt;/li&gt;&lt;li&gt;__sleep()&lt;/li&gt;&lt;li&gt;__wakeup()&lt;/li&gt;&lt;li&gt;__isset()&lt;/li&gt;&lt;li&gt;__unset()&lt;/li&gt;&lt;li&gt;__autoload()&lt;/li&gt;&lt;li&gt;__clone()&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;__construct()&lt;/b&gt;&lt;br /&gt;Constructor are special function in Object Oriented Programming. It gets called automatically whenever object of a class is created. This is useful for performing any pre operation before we start to call the methods of the class. PHP5 uses special keyword “__construct” to define constructor of the class.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; employee&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __construct&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Constructor Called"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;}&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; employee&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; employee&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;__destruct()&lt;/b&gt;&lt;br /&gt;Destructor are special function in Object Oriented Programming. It gets called automatically whenever object of a class is destroyed or goes out of scope. This is useful for clean up operation before cleaning the memory. &lt;b&gt;PHP 5&lt;/b&gt; uses special keyword “&lt;b&gt;__destruct&lt;/b&gt;” to define &lt;b&gt;destructor of the class&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; employee&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __destruct&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Destructor Called"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; employee&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&amp;nbsp;So when the page operation is completed destructor function is called automatically.&lt;br /&gt;&lt;b&gt;__set()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __set() Magic Method. The __set() Magic method in &lt;b&gt;PHP5&lt;/b&gt; gets called when setting the value to an undeclared or undefined attributes of an class. With this method the programmer can keep track on the variables which are not defined inside the class.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __set&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$value&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Error assigning values to undefined attributes"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"attributes Called:"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Value assigned to attributes:"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$value&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;setData&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;20&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Error assigning values to undefined attributes&lt;br /&gt;&lt;br /&gt;attributes Called:setData&lt;br /&gt;&lt;br /&gt;Value assigned to attributes:20&lt;span style="color: black; font-weight: bold;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;__get()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __get() Magic Method. The __get Magic method in &lt;b&gt;PHP5&lt;/b&gt; gets called when accessing the value of an undeclared or undefined&amp;nbsp;&lt;a href="http://www.hiteshagrawal.com/php/oops-in-php5/oops-in-php5-define-attributes-for-class"&gt;&lt;/a&gt;attribute of an class. With this method the programmer can keep track on the variables which are not defined inside the class.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __get&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Error accessing undefined attributes"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"attributes Called:"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;setData&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Error accessing undefined attributes&lt;br /&gt;&lt;br /&gt;attributes Called:setData&lt;span style="color: black; font-weight: bold;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;__call()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __call() Magic Method. The __call Magic method in &lt;b&gt;PHP5&lt;/b&gt; get called when accessing an undeclared or undefined methods of an class. With this magic method the programmer can keep track on the undeclared method which are not defined inside the class.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __call&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$argument&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Error accessing undefined Method"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Method Called: "&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Argument passed to the Method: "&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$argument&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;setData&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;  &lt;span style="color: #666666; font-style: italic;"&gt;//Calling setData method&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Error accessing undefined Method&lt;br /&gt;&lt;br /&gt;Method Called: setData&lt;br /&gt;&lt;br /&gt;Argument passed to the Method: Array (Array of the Argument Passed)&lt;span style="color: black; font-weight: bold;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;__toString()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __toString() Magic Method. The __toString() Magic method in &lt;b&gt;PHP5&lt;/b&gt; get called while trying to print or echo the class objects. This method can be used print all the methods and attributes defined for the class at runtime for debugging. Also this method can be used to give error message while somebody tries to print the class details.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __toString&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;"Caught You!! Cannot access the Class Object"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Output:&lt;/b&gt;  Caught You!! Cannot access the Class Object&lt;br /&gt;&lt;br /&gt;&lt;b&gt;__sleep()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __sleep() Magic Method. The __sleep() magic method in &lt;b&gt;PHP5&lt;/b&gt; gets called while serializing an object in &lt;b&gt;PHP5&lt;/b&gt;. Serializing is required to pass complex data across the network or PHP pages. It is also used to store data(files, database, cookies etc). With this magic method call we can define the way how the data object will be stored. The __sleep() method should be used along with __wakeup() magic method&lt;a href="http://./"&gt;.&lt;/a&gt; The __wakeup() magic method is called while unserializing the data and restores the serialized object to normal form.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __sleep&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Performing Clean-Up Operation Before Serializing Data "&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;"Serialized Data"&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt;"3"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$serializedata&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;serialize&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: #000088;"&gt;$serializedata&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;Performing Clean-Up Operation Before Serializing Data&lt;br /&gt;O:11:”magicmethod”:4:{s:15:”Serialized Data”;N;s:1:”1″;N;s:1:”2″;N;s:1:”3″;N;} &lt;br /&gt;&lt;br /&gt;&lt;b&gt;__wakeup()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __wakeup() Magic Method. The __wakeup() magic method of &lt;b&gt;PHP5&lt;/b&gt; gets called when unserialize operation on object is performed. This method allows us to restore the serialized data to its normal form.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;private&lt;/span&gt; &lt;span style="color: #000088;"&gt;$setName&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __sleep&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Performing Clean-Up Operation Before Serializing Data "&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #000088;"&gt;$this&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;setName&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: blue;"&gt;"Hello World!!!"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;setName&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __wakeup&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Performing Clean-Up Operation Before Unserializing Data "&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: #000088;"&gt;$this&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;setName&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$serializedata&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;serialize&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$serializedata1&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;unserialize&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$serializedata&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&amp;nbsp;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;Performing Clean-Up Operation Before Serializing Data&lt;br /&gt;Performing Clean-Up Operation Before Unserializing Data&lt;br /&gt;Hello World!!!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;__isset()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __isset() Magic Method. The __isset() magic method  in PHP5 is called whenever &lt;i&gt;&lt;b&gt;isset&lt;/b&gt;&lt;/i&gt; function of &lt;b&gt;PHP&lt;/b&gt; is called to check for undeclared data member. With the help of this method we can check for the undeclared variables in the code. We can also set appropriate error message while testing for variable names getting used in the Class.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __isset&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$variablename&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Variable '"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$variablename&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;"' not Set"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;isset&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Output:&lt;/b&gt; Variable ‘name’ not Set &lt;br /&gt;&lt;br /&gt;&lt;b&gt;__unset()&lt;/b&gt;&lt;br /&gt;This tutorial will guide you through the __unset() Magic Method. The __unset() magic method of &lt;strong&gt;PHP5&lt;/strong&gt; is called whenever &lt;strong&gt;&lt;em&gt;unset&lt;/em&gt;&lt;/strong&gt; function of &lt;strong&gt;PHP&lt;/strong&gt; is called to clear an undeclared data member. With the help of this method we can check for the undeclared variables in the code. We can also set appropriate error message while testing for variable names getting used in the Class.&lt;br /&gt;&lt;a href="http://www.hiteshagrawal.com/php/magic-methods-in-php5/php5-tutorial-__unset-magic-method"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __unset&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$variablename&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"Variable '"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$variablename&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;"' not Set and Cannot be UnSet"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;unset&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$a&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.hiteshagrawal.com/php/magic-methods-in-php5/php5-tutorial-__unset-magic-method"&gt; &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.hiteshagrawal.com/php/magic-methods-in-php5/php5-tutorial-__unset-magic-method"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Output:&lt;/strong&gt; Variable ‘name’ not Set and Cannot be UnSet &lt;br /&gt;&lt;a href="http://www.hiteshagrawal.com/php/magic-methods-in-php5/php5-tutorial-__unset-magic-method"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;__autoload()&lt;/b&gt;&lt;br /&gt;This methods get automatically called whenever you try to load an object of class which resides in separate file and you have not included those files using include,require and include_once. To use this method it is mandatory to the PHP filename as that of the class name because this methods accepts the class name as the argument. To know more about this method refer&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example – Basic AutoLoad Magic Method Usage&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;    &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __autoload&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$classname&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #b1b100;"&gt;include&lt;/span&gt; &lt;span style="color: #000088;"&gt;$classname&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;".php"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;//Here $classname=magicmethod1&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;    &lt;span style="color: #000088;"&gt;$a&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; magicmethod1&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Explanation for the Example:&lt;/strong&gt;&lt;br /&gt;Here i am trying to create an object of magicmethod1 class, but i have not included the magicmethod1.php so PHP compiler calls the __autoload() method which include that magicmethod1.php file.&lt;br /&gt;&lt;strong&gt;Code for magicmethod1.php&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;    &lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; magicmethod1&lt;br /&gt;    &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __construct&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"MagicMethod1 Class Called"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Output:&lt;/strong&gt; MagicMethod1 Class Called&lt;strong&gt; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hiteshagrawal.com/php/magic-methods-in-php5/php5-tutorial-__autoload-magic-method"&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;__clone()&lt;/b&gt;&lt;br /&gt;In &lt;b&gt;PHP 5&lt;/b&gt; when you assign one object to another object creates a reference copy and does not create duplicate copy. This would create a big mess as all the object will share the same memory defined for the object. To counter this PHP 5 has introduced clone method which creates an duplicate copy of the object. __clone magic method automatically get called whenever you call clone methods in PHP 5.&lt;br /&gt;&lt;br /&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; ?&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;class&lt;/span&gt; Animal&lt;br /&gt;&lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt; &lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: #000088;"&gt;$legs&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; setName&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #000088;"&gt;$this&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; setLegs&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #000088;"&gt;$legs&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #000088;"&gt;$this&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;legs&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$legs&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span style="color: black; font-weight: bold;"&gt;function&lt;/span&gt; __clone&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"&lt;br /&gt;Object Cloning in Progress"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;new&lt;/span&gt; Animal&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: blue;"&gt;"Tiger"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;legs&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$kangaroo&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; clone &lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$kangaroo&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: blue;"&gt;"Kangaroo"&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000088;"&gt;$kangaroo&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;legs&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"&lt;br /&gt;"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;"---"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$tiger&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;legs&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b1b100;"&gt;echo&lt;/span&gt; &lt;span style="color: blue;"&gt;"&lt;br /&gt;"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$kangaroo&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;name&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;"---"&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$kangaroo&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color: #004000;"&gt;legs&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold;"&gt;? &amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class="php" style="font-family: monospace;"&gt;&lt;span style="color: black; font-weight: bold;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;Object Cloning in Progress&lt;br /&gt;Tiger—4&lt;br /&gt;Kangaroo—2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3261044500735349521?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3261044500735349521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/magic-methods-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3261044500735349521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3261044500735349521'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/magic-methods-in-php.html' title='Magic Methods in PHP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3163505839816414524</id><published>2010-06-08T17:39:00.001+05:30</published><updated>2010-06-08T17:40:34.753+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>What is .htaccess Files</title><content type='html'>&lt;i&gt;&lt;b&gt;.htaccess files (or “distributed configuration files”) provide a way to make&lt;br /&gt;configuration changes on a per-directory basis. A file, containing one or more&lt;br /&gt;configuration directives, is placed in a particular document directory, and the&lt;br /&gt;directives apply to that directory, and all subdirectories thereof.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Directives&lt;/h4&gt;“Directives” is the terminology that Apache uses for the commands in Apache’s&lt;br /&gt;configuration files.  They are normally relatively short commands, typically&lt;br /&gt;key value pairs, that modify Apache’s behavior.  &lt;b&gt;An .htaccess file allows&lt;br /&gt;developers to execute a bunch of these directives without requiring access to&lt;br /&gt;Apache’s core server configuration file, often named httpd.conf.&lt;/b&gt;  This file,&lt;br /&gt;httpd.conf, is typically referred to as the “global configuration file” and I will&lt;br /&gt;refer to it with that name or its short filename equivalent.&lt;br /&gt;This feature is ideal for many hosting companies deploying a shared hosting&lt;br /&gt;environment.  The hosting company will not allow its customers to access the&lt;br /&gt;global configuration file, which ultimately affects all of the customers hosted on&lt;br /&gt;that server.  Instead, by enabling .htaccess, they give each of their customers&lt;br /&gt;the power to specify and execute their own Apache directives in their own&lt;br /&gt;directories and subdirectories.  Of course it’s also useful to the single&lt;br /&gt;developer, as you will see.&lt;br /&gt;It’s worth mentioning that anything that can be done with a .htaccess file can&lt;br /&gt;be done in the httpd.conf file.  However, &lt;i&gt;NOT&lt;/i&gt; everything that can be done in&lt;br /&gt;httpd.conf can be done in a .htaccess file.  In fact .htaccess files must be&lt;br /&gt;enabled in the httpd.conf file in order to be executed at all.  Once enabled,&lt;br /&gt;their power can be limited to certain “contexts” so that they may be allowed&lt;br /&gt;to override some settings but not others.  This gives the system administrators&lt;br /&gt;more control over what they let other developers get away with in their&lt;br /&gt;.htaccess files.&lt;br /&gt;&lt;br /&gt;for more Information about htaccess &lt;a href="http://net.tutsplus.com/tutorials/other/the-ultimate-guide-to-htaccess-files/" target="_blank"&gt;Click here &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3163505839816414524?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3163505839816414524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/what-is-htaccess-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3163505839816414524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3163505839816414524'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/what-is-htaccess-files.html' title='What is .htaccess Files'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7811741612558213581</id><published>2010-06-07T18:02:00.000+05:30</published><updated>2010-06-07T18:02:58.286+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><title type='text'>Facebook: CSS Background images won't show up on fbml canvas page</title><content type='html'>In many of Facebook Applications CSS background images are not showing some time  or the background images have shrunk and are tiled 4 times over. And If I copy the image path, and paste it in another tab and do a fetch in the browser, and again go back to my app canvas page and refresh it, the image shows up, but never does it show on the first load.&lt;br /&gt;&lt;br /&gt;If anybody having same problem then just upload these images in another domain and give it that path into FBML Application or You can use photobucket.com or imageshack for example.&lt;br /&gt;&lt;br /&gt;Im my case i uploaded my images in photobucket and i gave the absolute path in my CSS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7811741612558213581?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7811741612558213581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/facebook-css-background-images-wont.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7811741612558213581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7811741612558213581'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/facebook-css-background-images-wont.html' title='Facebook: CSS Background images won&apos;t show up on fbml canvas page'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8695715129579200061</id><published>2010-06-03T19:02:00.000+05:30</published><updated>2010-06-03T19:02:51.871+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Output Buffering</title><content type='html'>Without output buffering (the default), your HTML is sent to the browser in pieces as PHP processes through your script. With output buffering, your HTML is stored in a variable and sent to the browser as one piece at the end of your script.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Advantages of output buffering for Web developers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* Turning on output buffering alone decreases the amount of time it takes to download and render our HTML because it's not being sent to the browser in pieces as PHP processes the HTML.&lt;br /&gt;* All the fancy stuff we can do with PHP strings, we can now do with our whole HTML page as one variable.&lt;br /&gt;* If you've ever encountered the message "Warning: Cannot modify header information - headers already sent by (output)" while setting cookies, you'll be happy to know that output buffering is your answer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Here's a "hello world" of PHP output buffering&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;// start output buffering at the top of our script with this simple command&lt;br /&gt;ob_start();&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Hello world!&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;// end output buffering and send our HTML to the browser as a whole&lt;br /&gt;ob_end_flush();&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;It's that simple! Just by doing this our webpages appear less choppy as they render. Now let's take it one step futher.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The next step: compress the output&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the code below, ob_start() is changed to ob_start('ob_gzhandler'). That one simple change compresses our HTML, resulting in a smaller HTML download size for most browsers.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;// start output buffering at the top of our script with this simple command&lt;br /&gt;// we've added "ob_gzhandler" as a parameter of ob_start&lt;br /&gt;ob_start('ob_gzhandler');&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Hello world!&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;// end output buffering and send our HTML to the browser as a whole&lt;br /&gt;ob_end_flush();&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;one more step further: custom post processing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the code below, ob_start() is changed to ob_start('ob_postprocess'). ob_postprocess() is a function we define below used to make changes to the HTML before it is sent to the browser. Instead of Hello world!, the user will see Aloha world!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;// start output buffering at the top of our script with this simple command&lt;br /&gt;// we've added "ob_postprocess" (our custom post processing function) as a parameter of ob_start&lt;br /&gt;ob_start('ob_postprocess');&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Hello world!&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;// end output buffering and send our HTML to the browser as a whole&lt;br /&gt;ob_end_flush();&lt;br /&gt;&lt;br /&gt;// ob_postprocess is our custom post processing function&lt;br /&gt;function ob_postprocess($buffer)&lt;br /&gt;{&lt;br /&gt; // do a fun quick change to our HTML before it is sent to the browser&lt;br /&gt; $buffer = str_replace('Hello', 'Aloha', $buffer);&lt;br /&gt; // "return $buffer;" will send what is in $buffer to the browser, which includes our changes&lt;br /&gt; return $buffer;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;you can set cookies at any time with output buffering on&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Since HTML is not sent directly to the browser, we can set cookies anywhere in our scripts without worrying about anything. Just turn it on like we did in step 1 and voilà! No more cookie problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8695715129579200061?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8695715129579200061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/output-buffering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8695715129579200061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8695715129579200061'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/output-buffering.html' title='Output Buffering'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2509944167465718344</id><published>2010-06-03T18:51:00.001+05:30</published><updated>2010-06-03T18:52:05.267+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Jquery'/><title type='text'>Word Jumbling</title><content type='html'>According to a researcher at Cambridge University, it doesn’t matter in what order the letters in a word are, the only important thing is that the first and last letter be at the right place. The rest can be a total mess and you can still read it without problem. This is because the human mind does not read every letter by itself but the word as a whole.&lt;br /&gt;&lt;br /&gt;Here is the little JavaScript ‘program’ to do word jumbling written by James Padolsey.&lt;br /&gt;&lt;br /&gt;The first component is a function which jumbles a string’s characters: &lt;br /&gt;&lt;br /&gt;function jumble(word) {&lt;br /&gt;&lt;br /&gt;// Rand function will return 2-part array&lt;br /&gt;// [0] -&gt; Index of rand, [1] -&gt; random found value (from args)&lt;br /&gt;var rand = function(){&lt;br /&gt;var myRand = Math.floor(Math.random() * arguments.length);&lt;br /&gt;return [myRand, arguments[myRand]];&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;// Split passed word into array&lt;br /&gt;word = word.split(''),&lt;br /&gt;&lt;br /&gt;// Cache word length for easy looping&lt;br /&gt;length = word.length,&lt;br /&gt;&lt;br /&gt;// Prepate empty string for jumbled word&lt;br /&gt;jumbled = '',&lt;br /&gt;&lt;br /&gt;// Get array full of all available indexes:&lt;br /&gt;// (Reverse while loops are quickest: http://reque.st/1382)&lt;br /&gt;arrIndexes = [];&lt;br /&gt;while (length--) {&lt;br /&gt;arrIndexes.push(length);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Cache word length again:&lt;br /&gt;length = word.length;&lt;br /&gt;&lt;br /&gt;// Another loop&lt;br /&gt;while (length--) {&lt;br /&gt;// Get a random number, must be one of&lt;br /&gt;// those found in arrIndexes&lt;br /&gt;var rnd = rand.apply(null,arrIndexes);&lt;br /&gt;// Append random character to jumbled&lt;br /&gt;jumbled += word[rnd[1]];&lt;br /&gt;// Remove character from arrIndexes&lt;br /&gt;// so that it is not selected again:&lt;br /&gt;arrIndexes.splice(rnd[0],1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Return the jumbled word&lt;br /&gt;return jumbled;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The second component get’s the value of the textarea on each keyup event and jumbles all characters between the first and last letter of each word: (It also has a primitive way of handling simple punctuation)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$('textarea').keyup(function(){&lt;br /&gt;var text = $(this).val().split(/\s/g),&lt;br /&gt;converted = '';&lt;br /&gt;&lt;br /&gt;$.each(text, function(i,word){&lt;br /&gt;if(!word.length) return;&lt;br /&gt;&lt;br /&gt;// Extract punctuation:&lt;br /&gt;var puncPattern = /[,\.;:'!\?]+/,&lt;br /&gt;punc = word.match(puncPattern) ? word.match(puncPattern)[0] : '',&lt;br /&gt;puncIndex = word.search(puncPattern),&lt;br /&gt;word = word.replace(punc,'');&lt;br /&gt;&lt;br /&gt;// Compile new word, split to array:&lt;br /&gt;var newWord =&lt;br /&gt;(word.length &gt; 2 ?&lt;br /&gt;word.substr(0,1) + jumble(word.substr(1,word.length-2)) &lt;br /&gt;+ word.substr(word.length-1)&lt;br /&gt;: word).split('');&lt;br /&gt;&lt;br /&gt;// Insert punctuation back in:&lt;br /&gt;newWord.splice(puncIndex,0,punc);&lt;br /&gt;&lt;br /&gt;// Add space after word:&lt;br /&gt;converted += newWord.join('') + '\u0020';&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;// Inserted jumbled test into receiver:&lt;br /&gt;$('#receiver').text(converted);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://james.padolsey.com/scripts/expi/jumble/" target="_blank"&gt;You can see a demo of the above script here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2509944167465718344?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2509944167465718344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/word-jumbling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2509944167465718344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2509944167465718344'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/word-jumbling.html' title='Word Jumbling'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-997978177311014133</id><published>2010-06-03T18:38:00.002+05:30</published><updated>2010-06-03T18:38:36.847+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><title type='text'>Window Close Event</title><content type='html'>&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Window Close Event&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Style-Type" content="text/css"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Script-Type" content="text/javascript"&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;window.onbeforeunload = function (evt) {&lt;br /&gt;&amp;nbsp; var message = 'Are you sure you want to leave?';&lt;br /&gt;&amp;nbsp; if (typeof evt == 'undefined') {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt = window.event;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; if (evt) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; evt.returnValue = message;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; return message;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-997978177311014133?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/997978177311014133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/window-close-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/997978177311014133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/997978177311014133'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/window-close-event.html' title='Window Close Event'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2828736262461549534</id><published>2010-06-02T15:02:00.002+05:30</published><updated>2010-06-02T15:02:42.785+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Finding a file with particular content</title><content type='html'>Ever known that you had written a function for something, but can't remember which file it was in?&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;ol class="dp-sql" start="1"&gt;&lt;li class="alt"&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;grep&amp;nbsp;-iR&amp;nbsp;myFunction&amp;nbsp;./&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;pre class="sql" name="code" style="display: none;"&gt;grep -iR myFunction ./&lt;/pre&gt;"grep" is a program for printing out lines that match a particular pattern. You can provide it with some switches, like the "-i" for making it case-insensitive, and "-R" for making it recursive in my example. Then provide a pattern, and the path to search in (here I'm searching the current directory with "./"). This example will show the filename and the line in that file for any matches it finds to "myfunction" (case-insensitve because of the "-i").&lt;br /&gt;&lt;br /&gt;&lt;i&gt;If your projects are Subversion working copies, you may find that it's annoying to see results from the ".svn" directories. To exclude particular directories from the search, use the "--exclude-dir=" switch, for example "--exclude-dir=.svn".&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2828736262461549534?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2828736262461549534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/finding-file-with-particular-content.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2828736262461549534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2828736262461549534'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/finding-file-with-particular-content.html' title='Finding a file with particular content'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-9099488477022833677</id><published>2010-06-02T15:00:00.000+05:30</published><updated>2010-06-02T15:00:09.896+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Find / Replace in a Text File</title><content type='html'>Sometimes you have a big file, like maybe a database export, and you need to do some find / replace on it... but it won't open in any of your text editors, because your machine runs out of memory trying to open it! Well, here's a way around that, by using the command-line and a little regular expressions.&lt;br /&gt;The way this works is to output the contents of the SQL script (or whatever file you're using), pipe it through a program called "sed," which is specifically form manipulating streaming content, and then redirect that output into the new file. Sound complicated? Well... I guess it is a little, but the command itself looks simple!&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;ol class="dp-sql" start="1"&gt;&lt;li class="alt"&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;cat&amp;nbsp;original_dump.sql&amp;nbsp;|&amp;nbsp;sed&amp;nbsp;s/faruq/Shaik/&amp;nbsp;&amp;gt;&amp;nbsp;new_dump.sql&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;pre class="sql" name="code" style="display: none;"&gt;cat original_dump.sql | sed s/Japheth/Japh/ &amp;gt; new_dump.sql&lt;/pre&gt;The new part here is really the "sed" program. Basically what it's doing is taking input and matching the first pattern (in this case, my name, "faruq"), and replacing it with the second pattern (in this case, a shortening of my name, "Shaik"), then outputting that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-9099488477022833677?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/9099488477022833677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/find-replace-in-text-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9099488477022833677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9099488477022833677'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/find-replace-in-text-file.html' title='Find / Replace in a Text File'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8493118443405849951</id><published>2010-06-02T14:56:00.002+05:30</published><updated>2010-06-02T14:59:18.766+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>Restoring from a Database Backup (with GZip Compression)</title><content type='html'>So you’ve got a backup of your database (either using the method above, or some other way), and something has gone wrong and you need to restore, or you’re migrating it to a new server. You could use one of the other tools mentioned before, but in the example of phpMyAdmin, what if your database backup file is bigger than the allowed upload size? Well luckily, the command-line doesn’t mind.&lt;br /&gt;The command to restore is very similar to the one for backing up. Firstly, without GZip compression:&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;ol class="dp-sql" start="1"&gt;&lt;li class="alt"&gt;&lt;b&gt;cat&amp;nbsp;db_backup.sql&amp;nbsp;|&amp;nbsp;mysql&amp;nbsp;-u&amp;nbsp;mysqluser&amp;nbsp;-p&amp;nbsp;mysqldatabase&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;pre class="sql" name="code" style="display: none;"&gt;cat db_backup.sql | mysql -u mysqluser -p mysqldatabase&lt;/pre&gt;We use the “cat” command to output the contents of the backup script, and pipe its contents into the mysql program. As you can see, the mysql program takes the same options as the mysqldump one does in section two.&lt;br /&gt;Now if the script was GZip compressed, we can’t just output its contents into mysql, as it will be compressed data instead of a nice SQL script. So we do the following: &lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;ol class="dp-sql" start="1"&gt;&lt;li class="alt"&gt;&lt;b&gt;gunzip&amp;nbsp;&amp;lt;&amp;nbsp;db_backup.sql.gz&amp;nbsp;|&amp;nbsp;mysql&amp;nbsp;-u&amp;nbsp;mysqluser&amp;nbsp;-p&amp;nbsp;mysqldatabase&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;pre class="sql" name="code" style="display: none;"&gt;gunzip &amp;lt; db_backup.sql.gz | mysql -u mysqluser -p mysqldatabase&lt;/pre&gt;See, it's very familiar, just switched around a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8493118443405849951?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8493118443405849951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/restoring-from-database-backup-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8493118443405849951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8493118443405849951'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/restoring-from-database-backup-with.html' title='Restoring from a Database Backup (with GZip Compression)'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2330820890030591916</id><published>2010-06-02T14:27:00.002+05:30</published><updated>2010-06-02T14:42:08.464+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wallpapers'/><title type='text'>JUNE 2010 Desktop Wallpapers</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_4y9W6y2on8c/TAYdIQC-v_I/AAAAAAAAAL0/6QnSIYa9STw/s1600/june8.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/_4y9W6y2on8c/TAYdIQC-v_I/AAAAAAAAAL0/6QnSIYa9STw/s320/june8.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_4y9W6y2on8c/TAYdJ_l4yDI/AAAAAAAAAL4/kdEHCaUzfSo/s1600/june1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_4y9W6y2on8c/TAYdJ_l4yDI/AAAAAAAAAL4/kdEHCaUzfSo/s320/june1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_4y9W6y2on8c/TAYdLB_gBSI/AAAAAAAAAL8/lNS0V5LN_EY/s1600/june2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_4y9W6y2on8c/TAYdLB_gBSI/AAAAAAAAAL8/lNS0V5LN_EY/s320/june2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_4y9W6y2on8c/TAYdLzfUbvI/AAAAAAAAAMA/rJ2Aq6bAqyk/s1600/june3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/_4y9W6y2on8c/TAYdLzfUbvI/AAAAAAAAAMA/rJ2Aq6bAqyk/s320/june3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_4y9W6y2on8c/TAYdNHPg_0I/AAAAAAAAAME/um1TlKYz_88/s1600/june4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_4y9W6y2on8c/TAYdNHPg_0I/AAAAAAAAAME/um1TlKYz_88/s320/june4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_4y9W6y2on8c/TAYdOsQWjfI/AAAAAAAAAMI/TVdWzQuIbZM/s1600/june6.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_4y9W6y2on8c/TAYdOsQWjfI/AAAAAAAAAMI/TVdWzQuIbZM/s320/june6.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_4y9W6y2on8c/TAYcrEXZNoI/AAAAAAAAALw/2RZw480M7Qg/s1600/june7.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/_4y9W6y2on8c/TAYcrEXZNoI/AAAAAAAAALw/2RZw480M7Qg/s320/june7.png" width="320" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2330820890030591916?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2330820890030591916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/june-2010-desktop-wallpaper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2330820890030591916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2330820890030591916'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/june-2010-desktop-wallpaper.html' title='JUNE 2010 Desktop Wallpapers'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_4y9W6y2on8c/TAYdIQC-v_I/AAAAAAAAAL0/6QnSIYa9STw/s72-c/june8.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3213177847986057120</id><published>2010-06-01T10:29:00.005+05:30</published><updated>2010-06-01T10:32:13.329+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><title type='text'>Facebook : Invite Page</title><content type='html'>&amp;lt;?php&lt;br /&gt;//?fb_force_mode=fbml&lt;br /&gt;require_once '../facebook.php';&lt;br /&gt;$api_key = '8b68ebaa2353e83cd906b246###';&lt;br /&gt;$secret = '8d4348f4bbfaa176b0c29e364f###';&lt;br /&gt;&lt;br /&gt;// Names and images &lt;br /&gt;$app_name = "Map App"; &lt;br /&gt;$app_url = "map_app"; &lt;br /&gt;&lt;br /&gt;// Assumes application is at &lt;a href="http://apps.facebook.com/app-url/"&gt;http://apps.facebook.com/app-url/&lt;/a&gt; &lt;br /&gt;$app_image = "Application image URL"; &lt;br /&gt;$invite_href = "invite.php?fb_force_mode=fbml"; &lt;br /&gt;&lt;br /&gt;// Rename this as needed require_once 'facebook.php'; &lt;br /&gt;$facebook = new Facebook($api_key, $secret); &lt;br /&gt;$facebook-&amp;gt;require_frame(); &lt;br /&gt;$user = $facebook-&amp;gt;require_login(); &lt;br /&gt;&lt;br /&gt;if(isset($_POST["ids"])) { &lt;br /&gt;&amp;nbsp; echo "&amp;lt;center&amp;gt;Thank you for inviting ".sizeof($_POST["ids"])." of your friends on &amp;lt;b&amp;gt;&amp;lt;a href=\"http://apps.facebook.com/".$app_url."/\"&amp;gt;".$app_name."&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;\n"; &lt;br /&gt;&amp;nbsp; echo "&amp;lt;h2&amp;gt;&amp;lt;a href=\"http://apps.facebook.com/".$app_url."/\"&amp;gt;Click here to return to ".$app_name."&amp;lt;/a&amp;gt;.&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;"; &lt;br /&gt;} else { &lt;br /&gt;&amp;nbsp; // Retrieve array of friends who've already added the app. &lt;br /&gt;&amp;nbsp; $fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user.') AND is_app_user = 1'; &lt;br /&gt;&amp;nbsp; $_friends = $facebook-&amp;gt;api_client-&amp;gt;fql_query($fql); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Extract the user ID's returned in the FQL request into a new array. &lt;br /&gt;&amp;nbsp; $friends = array(); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; if (is_array($_friends) &amp;amp;&amp;amp; count($_friends)) { &lt;br /&gt;&amp;nbsp; &amp;nbsp; foreach ($_friends as $friend) { $friends[] = $friend['uid']; } } &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Convert the array of friends into a comma-delimeted string. &lt;br /&gt;&amp;nbsp; $friends = implode(',', $friends); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Prepare the invitation text that all invited users will receive. &lt;br /&gt;&amp;nbsp; $content = "&amp;lt;fb:name uid=\"".$user."\" firstnameonly=\"true\" shownetwork=\"false\"/&amp;gt; has started using &amp;lt;a href=\"http://apps.facebook.com/".$app_url."/\"&amp;gt;".$app_name."&amp;lt;/a&amp;gt; and thought it's &amp;lt;u&amp;gt;so cool even you should try it out&amp;lt;/u&amp;gt;!\n". &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"&amp;lt;fb:req-choice url=\"".$facebook-&amp;gt;get_add_url()."\" label=\"Add ".$app_name." to your profile\"/&amp;gt;"; &lt;br /&gt;?&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;fb:request-form action="&amp;lt;? echo $invite_href; ?&amp;gt;" method="post" type="&amp;lt;? echo $app_name; ?&amp;gt;" content="&amp;lt;? echo htmlentities($content); ?&amp;gt;" image="&amp;lt;? echo $app_image; ?&amp;gt;"&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;fb:multi-friend-selector actiontext="Here are your friends who don't have &amp;lt;? echo $app_name; ?&amp;gt; yet. Invite whoever you want -it's free!" exclude_ids="&amp;lt;? echo $friends; ?&amp;gt;" /&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;/fb:request-form&amp;gt; &lt;br /&gt;&amp;lt;? &lt;br /&gt;} &lt;br /&gt;?&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3213177847986057120?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3213177847986057120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/06/facebook-invite-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3213177847986057120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3213177847986057120'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/06/facebook-invite-page.html' title='Facebook : Invite Page'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1823265665346919588</id><published>2010-05-27T13:31:00.001+05:30</published><updated>2010-05-27T13:32:08.043+05:30</updated><title type='text'>Use Firebug in any Browser</title><content type='html'>Firebug is without doubt one of the greatest assets to web development available; I certainly use it on a daily basis when developing for the web, and I know it’s the plugin of choice for many others too. An unfortunate side-effect of Firebug’s excellence is that other similar tools for other browsers pale in comparison and appear inferior. Trouble-shooting layout issues and CSS bugs in IE for example can be a lesson in futility.&lt;br /&gt;&lt;br /&gt;This is where Firebug Lite steps in; this is a simple JavaScript library that recreates most of the key features of the Firebug interface, bringing our debugger of choice to all other platforms. Fixing layouts and troubleshooting cross-browser issues becomes easy once more.&lt;br /&gt;&lt;br /&gt;One of the greatest things about Firebug Lite is that you don’t need to download it or install anything in order to start using it; when you want to debug a page you’re working on in browsers that aren’t Firefox you can just include a script file whose SRC points to the online version: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt; script src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js" type="text/javascript" &amp;gt;&lt;br /&gt;&amp;lt; /script &amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;That’s it, when you run the page in any other browser, Firebug Lite will be present on the page. For off line use, the script file, as well as a CSS file, can be downloaded and should just be used like any other JS or CSS file. The following screenshot shows Firebug Lite in Safari:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1823265665346919588?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1823265665346919588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/use-firebug-in-any-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1823265665346919588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1823265665346919588'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/use-firebug-in-any-browser.html' title='Use Firebug in any Browser'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1715932505597205617</id><published>2010-05-27T09:45:00.000+05:30</published><updated>2010-05-27T09:45:12.912+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Introducing the Google Font API &amp; Google Font Directory</title><content type='html'>&lt;p&gt;&lt;br /&gt;The Google Font API provides a simple, cross-browser method for using any font in the Google Font Directory on your web page. The fonts have all the advantages of normal text: in addition to being richer visually, text styled in web fonts is still searchable, scales crisply when zoomed, and is accessible to users using screen readers.&lt;br /&gt;&lt;br /&gt;Getting started using the Google Font API is easy. Just add a couple lines of HTML:&lt;/p&gt;&lt;pre&gt;&amp;lt;link href='http://fonts.googleapis.com/css?family=Tangerine' rel='stylesheet' type='text/css'&amp;gt;&lt;br /&gt;&lt;br /&gt;body { font-family: 'Tangerine', serif; }&lt;/pre&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_WEcneQZVud0/S_N9ruwRRFI/AAAAAAAAACc/_nzj38oWHUU/s1600/Tangerine.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img id="BLOGGER_PHOTO_ID_5472856162423620690" style="border: 0pt none; margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 71px;" src="http://1.bp.blogspot.com/_WEcneQZVud0/S_N9ruwRRFI/AAAAAAAAACc/_nzj38oWHUU/s400/Tangerine.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1715932505597205617?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1715932505597205617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/introducing-google-font-api-google-font.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1715932505597205617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1715932505597205617'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/introducing-google-font-api-google-font.html' title='Introducing the Google Font API &amp; Google Font Directory'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WEcneQZVud0/S_N9ruwRRFI/AAAAAAAAACc/_nzj38oWHUU/s72-c/Tangerine.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2342445547648923035</id><published>2010-05-26T14:23:00.001+05:30</published><updated>2010-05-26T14:41:23.506+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>PostgreSQL: date/time functions with INTERVAL</title><content type='html'>&lt;span id="intelliTxt" name="intelliTxt"&gt;A lot of people are wondering why date/time functions are working differently in PostgreSQL 7.2 and up. For example queries like the following no longer work:&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CODE:1 &lt;/b&gt;&lt;br /&gt;SELECT id FROM orders&lt;br /&gt;WHERE interval(current_timestamp - order_date) &amp;lt; interval('1 month');&lt;br /&gt;&lt;br /&gt;&lt;span id="intelliTxt" name="intelliTxt"&gt;INTERVAL is really not a function. It is a datatype and an operator. In earlier version of PostgreSQL, you were allowed to 'sort of' use it as a function, but that no longer exists. Instead, try to either:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CODE:2 &lt;span id="intelliTxt" name="intelliTxt"&gt;cast your value to an interval datatype:&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;SELECT id FROM orders&lt;br /&gt;WHERE (current_timestamp - order_date) &amp;lt; ('1 month')::interval; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;CODE :3 &lt;span id="intelliTxt" name="intelliTxt"&gt;you can use the "interval" keyword as an operator to a timestamp representation:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SELECT id FROM orders&lt;br /&gt;WHERE (current_timestamp - order_date) &amp;lt; (interval '1 month 3 days');&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CODE :4 &lt;span id="intelliTxt" name="intelliTxt"&gt;it works with parentheses if you remove any ambiguity about the parentheses. (Meaning: if you need parentheses for your expression, then put "interval" in quotes:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SELECT id FROM orders&lt;br /&gt;WHERE (current_timestamp - order_date) &amp;lt; ("interval" (current_timestamp - &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT order_date FROM orders WHERE id = 2)));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2342445547648923035?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2342445547648923035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/postgresql-datetime-functions-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2342445547648923035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2342445547648923035'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/postgresql-datetime-functions-with.html' title='PostgreSQL: date/time functions with INTERVAL'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-55977637797437449</id><published>2010-05-21T17:41:00.001+05:30</published><updated>2010-05-21T17:41:34.415+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cakephp'/><title type='text'>Cakephp Cheet Sheet</title><content type='html'>Here you can find the Cakephp cheetsheet.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf" target="_blank"&gt;http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-55977637797437449?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/55977637797437449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/cakephp-cheet-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/55977637797437449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/55977637797437449'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/cakephp-cheet-sheet.html' title='Cakephp Cheet Sheet'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7920898213653723691</id><published>2010-05-19T09:57:00.002+05:30</published><updated>2010-05-19T09:58:33.775+05:30</updated><title type='text'>Check Browser Compatibilty in Online</title><content type='html'>Now you can check your web design in different browsers on Browsershots.It is a free open-source online service.And you can send those screenshots to your mail also.&lt;br /&gt;&lt;br /&gt;URL:&lt;a href="http://browsershots.org/" target="_blank"&gt;http://browsershots.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7920898213653723691?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7920898213653723691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/check-browser-compatibilty-in-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7920898213653723691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7920898213653723691'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/check-browser-compatibilty-in-online.html' title='Check Browser Compatibilty in Online'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3381617791529742577</id><published>2010-05-18T19:32:00.002+05:30</published><updated>2010-05-18T19:32:37.661+05:30</updated><title type='text'>Google Search for Your Site</title><content type='html'>Integrating search on a website can be an incredibly complex subject far beyond my web development skills. Fortunately, Google offers a service called “Custom Search Engine” which you can integrate right into your own site. This leverages Googles awesome search power, and it can all happen directly on your own website!&lt;br /&gt;&lt;br /&gt;URL: http://www.google.com/cse/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3381617791529742577?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3381617791529742577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/google-search-for-your-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3381617791529742577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3381617791529742577'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/google-search-for-your-site.html' title='Google Search for Your Site'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3436438408046560253</id><published>2010-05-18T10:01:00.002+05:30</published><updated>2010-05-18T10:58:51.428+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery'/><title type='text'>Check/Uncheck Checkbox Jquery</title><content type='html'>&amp;lt;script type="text/javascript" language="javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j(document).ready(function () { &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j('#checkboxToggle').click(function () { &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j("input[type=checkbox]").each(function () { &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.checked == true) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j("input[type=checkbox]").attr('checked', false);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j("input[type=checkbox]").attr('checked', true);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------&lt;br /&gt;IN JS&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;html&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;head&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;script&lt;/span&gt; &lt;span class="ident"&gt;language&lt;/span&gt;&lt;span class="punct"&gt;='&lt;/span&gt;&lt;span class="string"&gt;JavaScript&lt;/span&gt;&lt;span class="punct"&gt;'&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="ident"&gt;checked&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="ident"&gt;function&lt;/span&gt; &lt;span class="ident"&gt;checkedAll&lt;/span&gt; &lt;span class="punct"&gt;()&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;checked&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;&lt;span class="punct"&gt;){&lt;/span&gt;&lt;span class="ident"&gt;checked&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;&lt;span class="punct"&gt;}&lt;/span&gt;&lt;span class="keyword"&gt;else&lt;/span&gt;&lt;span class="punct"&gt;{&lt;/span&gt;&lt;span class="ident"&gt;checked&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;&lt;span class="punct"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="keyword"&gt;for&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;var&lt;/span&gt; &lt;span class="ident"&gt;i&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt; &lt;span class="ident"&gt;i&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;getElementById&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;myform&lt;/span&gt;&lt;span class="punct"&gt;').&lt;/span&gt;&lt;span class="ident"&gt;elements&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;length&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt; &lt;span class="ident"&gt;i&lt;/span&gt;&lt;span class="punct"&gt;++)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;getElementById&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;myform&lt;/span&gt;&lt;span class="punct"&gt;').&lt;/span&gt;&lt;span class="ident"&gt;elements&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="ident"&gt;i&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;checked&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;checked&lt;/span&gt;&lt;span class="punct"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="regex"&gt;script&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;head&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;body&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;form&lt;/span&gt; &lt;span class="ident"&gt;id&lt;/span&gt;&lt;span class="punct"&gt;="&lt;/span&gt;&lt;span class="string"&gt;myform&lt;/span&gt;&lt;span class="punct"&gt;"&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;input&lt;/span&gt; &lt;span class="ident"&gt;type&lt;/span&gt;&lt;span class="punct"&gt;="&lt;/span&gt;&lt;span class="string"&gt;checkbox&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt; &lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;="&lt;/span&gt;&lt;span class="string"&gt;foo&lt;/span&gt;&lt;span class="punct"&gt;"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;input&lt;/span&gt; &lt;span class="ident"&gt;type&lt;/span&gt;&lt;span class="punct"&gt;="&lt;/span&gt;&lt;span class="string"&gt;checkbox&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt; &lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;="&lt;/span&gt;&lt;span class="string"&gt;bar&lt;/span&gt;&lt;span class="punct"&gt;"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="constant"&gt;BR&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;span class="constant"&gt;Check&lt;/span&gt; &lt;span class="ident"&gt;all&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;input&lt;/span&gt; &lt;span class="ident"&gt;type&lt;/span&gt;&lt;span class="punct"&gt;='&lt;/span&gt;&lt;span class="string"&gt;checkbox&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;='&lt;/span&gt;&lt;span class="string"&gt;checkall&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="ident"&gt;onclick&lt;/span&gt;&lt;span class="punct"&gt;='&lt;/span&gt;&lt;span class="string"&gt;checkedAll();&lt;/span&gt;&lt;span class="punct"&gt;'&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="regex"&gt;form&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;body&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="regex"&gt;html&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3436438408046560253?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3436438408046560253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/checkuncheck-checkbox-jquery_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3436438408046560253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3436438408046560253'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/checkuncheck-checkbox-jquery_18.html' title='Check/Uncheck Checkbox Jquery'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-420028666326731421</id><published>2010-05-12T12:56:00.000+05:30</published><updated>2010-05-12T12:56:29.684+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL:DATE'/><title type='text'>MYSQL:Get Current Date Records from TIMESTAMP</title><content type='html'>SELECT your_columns FROM your_table WHERE DATE(date_posted) = CURDATE();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-420028666326731421?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/420028666326731421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/mysqlget-current-date-records-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/420028666326731421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/420028666326731421'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/mysqlget-current-date-records-from.html' title='MYSQL:Get Current Date Records from TIMESTAMP'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5724016523324222170</id><published>2010-05-05T15:09:00.003+05:30</published><updated>2010-05-05T15:10:56.394+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CI'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Codeigniter in PHP 5.3</title><content type='html'>First, here’s how to solve the issue regarding these errors:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\ci\system\codeigniter\Common.php on line 130&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\ci\system\codeigniter\Common.php on line 136&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In index.php in your CI folder replace line 12 “&lt;code&gt;error_reporting(E_ALL);&lt;/code&gt;” (without quotes) with this:&lt;br /&gt;“&lt;code&gt;error_reporting(E_ALL &amp;amp; ~E_DEPRECATED);&lt;/code&gt;” (without quotes)&lt;br /&gt;&lt;br /&gt;Then, you’ll probably get an error about a bad URI if you try to run any controlls. It should say something like this: “The URI you submitted has disallowed characters.”&lt;br /&gt;&lt;br /&gt;&lt;span id="more-1953"&gt;&lt;/span&gt;&lt;br /&gt;Here’s the solution for that as well. In URI.php which is located in \system\libraries replace line 189:&lt;br /&gt;“&lt;code&gt;if ( ! preg_match("|^[".preg_quote($this-&amp;gt;config-&amp;gt;item&lt;br /&gt;('permitted_uri_chars'))."]+$|i", $str))&lt;/code&gt;” (without quotes and without the line break (it’s all one line)&lt;br /&gt;&lt;br /&gt;to read like this:&lt;br /&gt;“&lt;code&gt;if ( ! preg_match("|^[".str_replace('\\-', '-', preg_quote ($this-&amp;gt;config-&amp;gt;item('permitted_uri_chars')))."]+$|i", $str))&lt;/code&gt;” again without the quotes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5724016523324222170?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5724016523324222170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/05/codeigniter-in-php-53.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5724016523324222170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5724016523324222170'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/05/codeigniter-in-php-53.html' title='Codeigniter in PHP 5.3'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-11935503198097310</id><published>2010-04-23T16:59:00.000+05:30</published><updated>2010-04-23T16:59:59.983+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex with PHP Usefull Links for Beginners</title><content type='html'>http://onlamp.com/pub/a/onlamp/2007/07/19/introduction-to-flex-using-php.html&lt;br /&gt;&lt;br /&gt;http://livedocs.adobe.com/flex/3/html/help.html&lt;br /&gt;&lt;br /&gt;http://cookbooks.adobe.com/post_Dynamic_Images___Buttons_in_Datagrid_using_MYSQL__-8703.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-11935503198097310?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/11935503198097310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/flex-with-php-usefull-links-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/11935503198097310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/11935503198097310'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/flex-with-php-usefull-links-for.html' title='Flex with PHP Usefull Links for Beginners'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6751609545087579897</id><published>2010-04-23T16:55:00.000+05:30</published><updated>2010-04-23T16:55:57.546+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex: Get Response from HTTPService</title><content type='html'>&amp;nbsp;&amp;lt;mx:Script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![CDATA[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import mx.rpc.events.ResultEvent;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import mx.rpc.events.FaultEvent;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import mx.controls.Alert;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private var alert:Alert;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function send_data():void { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userRequest.send();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function httpService_fault(evt:FaultEvent):void {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var title:String = evt.type + " (" + evt.fault.faultCode + ")";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(title);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function httpService_result(evt:ResultEvent):void {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var msg:String = userRequest.lastResult.responce;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(msg == '1') {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var url:String = "http://localhost/flex/firstapp/home.html";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var request:URLRequest = new URLRequest(url);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateToURL(request);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; //Alert.show('correct');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Alert.show(msg);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:Script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;mx:HTTPService &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; id="userRequest" &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; url="http://localhost/flex/firstapp/index.php" &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; method="POST" &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; fault="httpService_fault(event);"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; result="httpService_result(event)"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; resultFormat="e4x"&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6751609545087579897?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6751609545087579897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/flex-get-response-from-httpservice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6751609545087579897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6751609545087579897'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/flex-get-response-from-httpservice.html' title='Flex: Get Response from HTTPService'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7950302511106989026</id><published>2010-04-21T16:08:00.003+05:30</published><updated>2010-04-21T16:10:25.319+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Drupal: Turn off Register_Globals</title><content type='html'>&lt;b&gt;Method 1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Place a file called php.ini in your accounts root directory with the following content: register_globals = false (you can also try using 'off', or '0'instead of 'false').&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Method 2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Place a file called .htaccess in your acccounts root directory with the following content:&lt;br /&gt;php_flag register_globals off&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7950302511106989026?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7950302511106989026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/drupal-turn-off-registerglobals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7950302511106989026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7950302511106989026'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/drupal-turn-off-registerglobals.html' title='Drupal: Turn off Register_Globals'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2363326653029258426</id><published>2010-04-20T12:11:00.001+05:30</published><updated>2010-04-20T12:12:26.974+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><title type='text'>Facebook: Set Username for your pages</title><content type='html'>Here is the URL &lt;a href="http://www.facebook.com/username/"&gt;http://www.facebook.com/username/&lt;/a&gt; where you can set the username for all your&amp;nbsp; pages&amp;nbsp; as well as for your account like:&lt;br /&gt;http://facebook.com/&lt; username &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2363326653029258426?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2363326653029258426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/facebook-set-username-for-your-pages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2363326653029258426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2363326653029258426'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/facebook-set-username-for-your-pages.html' title='Facebook: Set Username for your pages'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1420037349100684942</id><published>2010-04-20T11:58:00.001+05:30</published><updated>2010-04-20T11:59:02.504+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><title type='text'>Add Boxes to the Wall Sidebar of Your Facebook Page</title><content type='html'>Here are the steps to adding a left sidebar ad/button/image to your Facebook Page wall:&lt;br /&gt;&lt;b&gt;1. Click the “Edit Page” link on your Fan Page main page&lt;/b&gt;&lt;br /&gt;&lt;b&gt;2. Install the “Static FBML” Application from Facebook.&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Look for the “More Applications” box at the bottom of the edit area.&lt;/li&gt;&lt;li&gt;After you search you should see the “Static FBML” application in the search results.&lt;/li&gt;&lt;li&gt;Click on the “Static FBML” link.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;3. Add the Static FBML application from Facebook to your Fan Page&lt;/b&gt; &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp; Click the “Add to my Page” link on the Static FBML page.&lt;/li&gt;&lt;li&gt;After you click the “Add to my Page” link you may get a selection popup that asks which Facebook Page you want to add the application to. Just click the “Add to Page” button for the appropriate page.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;4. Add content to the Static FBML application&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Now you need to get back to your Facebook Page that you just added the Static FBML application to and click the “Edit Page” link again.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;There should be a new box in the middle of the edit page&lt;/li&gt;&lt;li&gt;Click the “Edit” link.&lt;/li&gt;&lt;li&gt;Now you will see a very simple editing interface with “Box Title:” and “FBML:” fields.&lt;/li&gt;&lt;li&gt;The Box Title is just text, but the FBML field can take &lt;a href="http://www.w3schools.com/html/default.asp"&gt;HTML&lt;/a&gt; or &lt;a href="http://wiki.developers.facebook.com/index.php/Category:FBML_tags"&gt;FBML&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Insert the your code into FBML field:&lt;/li&gt;&lt;li&gt;Click “Save Changes” at the bottom.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;5. Move the new FBML box to the Wall page&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Go back to your main Facebook Page tab.  Then go to the “Boxes” tab.  You should see your code&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Thats it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1420037349100684942?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1420037349100684942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/add-boxes-to-wall-sidebar-of-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1420037349100684942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1420037349100684942'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/add-boxes-to-wall-sidebar-of-your.html' title='Add Boxes to the Wall Sidebar of Your Facebook Page'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4471530696200144478</id><published>2010-04-16T13:00:00.002+05:30</published><updated>2010-04-16T13:02:32.010+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>mysql - Reset Root User Privileges</title><content type='html'>1.  Find the my.ini file (my.cnf for linux).  On windows, the my.ini file is typically in your install directory: c:\Program Files\MySQL\MySQL Server 5.1\my.ini  &lt;br /&gt;OR if your using xamp then it will be C:\xampp\mysql\bin\my.ini&lt;br /&gt;Open the file with notepad (or any text editor) and add the following entry under the [mysqld] section:&lt;br /&gt;&lt;br /&gt;skip-grant-tables&lt;br /&gt;&lt;br /&gt;Then, save the file and restart the MySQL service.&lt;br /&gt;&lt;br /&gt;If you have Phpmyadmin then select the mysql databese and open the user table. In that you will find the all mysql users.&lt;br /&gt;&lt;br /&gt;Then you need to edit the root row and update all the radio buttons with Y.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you dont have Phpmyadmin then &lt;br /&gt;mysql &gt; use mysql;&lt;br /&gt;Delete the old root user like&lt;br /&gt;mysql &gt; delete from user where user='root';&lt;br /&gt;&lt;br /&gt;Create root user again (WITH RIGHTS!)&lt;br /&gt;&lt;br /&gt;mysql &gt; INSERT INTO user (Host, User, Password, Select_priv, Insert_priv,&lt;br /&gt;Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv,&lt;br /&gt;Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,&lt;br /&gt;Index_priv, Alter_priv) VALUES ('localhost', 'root', PASSWORD('thepass'),&lt;br /&gt;'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');&lt;br /&gt;&lt;br /&gt;OR &lt;br /&gt;you can update the above instead of re creating the user account.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After that remove the skip-grant-tables from the my.ini file and restart the Mysql. thats it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4471530696200144478?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4471530696200144478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/mysql-reset-root-user-privileges.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4471530696200144478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4471530696200144478'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/mysql-reset-root-user-privileges.html' title='mysql - Reset Root User Privileges'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8420009210651361202</id><published>2010-04-15T19:25:00.003+05:30</published><updated>2010-04-17T08:17:37.584+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How to know who are online at present in any system</title><content type='html'>We can find out who are online or logged in to the system. This also displayed as members active now at the footer of any site or in any login system. This is integrated in any login system of any site. We will try to learn how such a system works and display the names ( or user ids ) of the members active at the site. This is part of any system where members login with their user id and password.&lt;br /&gt;&lt;br /&gt;As you can understand the member session details after login are stored at server side and not at the client end. So getting the details from the server is not possible as scripts will not have root access. So we will try to maintain one more parallel system to know who are logged in. Here some steps we have taken exclusively for this and let us learn different steps of this script.&lt;br /&gt;&lt;br /&gt;Storing the login information in a table&lt;br /&gt;Every time a member successfully loges in we will store the details by adding a record to our table exclusively created for this purpose. We call this table as plus_login. It has five fields storing session id inside field name id, usrid storing user id of the logged in member, ip address of the system from where member has logged in, time of logging in the field name tm and status which will be setting to OFF once the member logged out and we will set it to ON by default. So once a member logged in we will store all these information by inserting a record where the status by default gets set to ON. The structure of the table ( sql dump ) is available inside the download zip file at the end of this tutorial.&lt;br /&gt;&lt;br /&gt;Updating the status of the member&lt;br /&gt;We have the status stored in our plus_login table where we have set the status to ON. Along with the status we are also storing the time of logged in. Now we have to update this status to ON and update the new time (field name tm) on every time the member opens inside the member area. We have kept the code to update the plus_table with new time and status to ON inside the page bottom.php. This page bottom.php is called by all pages at the end. This bottom.php page does three jobs. First it update the status of the logged in user with new time and set status to ON. Here is the code of this first step.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$tm=date("Y-m-d H:i:s");&lt;br /&gt;$q=mysql_query("update plus_login set status='ON',tm='$tm' where id='$session[id]'");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Second it mark the status to OFF for all the members who has not interacted with the site within last 10 minutes. ( that is the reason we will be making the status ON and new time for every page call of the member ). Here is the code inside bottom.php for this step.&lt;br /&gt;&lt;br /&gt;$gap=10; // Gap value can be changed, this is in minutes.&lt;br /&gt;// let us find out the time before 10 minutes of present time. //&lt;br /&gt;$tm=date ("Y-m-d H:i:s", mktime (date("H"),date("i")-$gap,date("s"),date("m"),date("d"),date("Y")));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the query to do this&lt;br /&gt;$ut=mysql_query("update plus_login set status='OFF' where tm &amp;lt; '$tm'"); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At third step it collects the member login ids for which the time is within last 10 minutes and status is set to ON. They are our logged in members or who are active at site. The code you can see one Displaying who are active at site section ( scroll down ) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What happens when a user logs out We change the system status to OFF and destroy the session. We have kept this code inside logout page. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$q=mysql_query("update plus_login set status='OFF' where id='$session[id]'"); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What happens when member does not interact for more than 10 minutes? You can see every time any page is opened and if the page is calling bottom.php page then all users will be changed to status OFF if their tm ( field ) is less than 10 minute of present time. So if no other member has opened any page then the status will not change to OFF. If you think this is to be taken care then you can use one scheduler ( win server ) or cron to run the status update part once in every 10 minutes. Check the query above at the third step.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Displaying who are active at site We have kept the code inside bottom.php file, so from any other page this page can be called. You can see the code inside this page where we have used one simple query to collect the user id for which status is ON and time field ( tm ) is more than present time minus 10 minutes. The query is here .  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$qt=mysql_query("select userid from plus_login where tm &amp;gt; '$tm' and status='ON'");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8420009210651361202?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8420009210651361202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/how-to-know-who-are-online-at-present.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8420009210651361202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8420009210651361202'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/how-to-know-who-are-online-at-present.html' title='How to know who are online at present in any system'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-9078421359540868008</id><published>2010-04-14T19:30:00.002+05:30</published><updated>2010-04-14T19:30:36.054+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Write PHP Code in HTML File</title><content type='html'>Here is the way to write the PHP logic in HTML File(i.e .html file).&lt;br /&gt;&lt;br /&gt;In two ways we can achieve this.&lt;br /&gt;&lt;br /&gt;1.change the setting in apache configuration file(i.e httpd.conf)&lt;br /&gt;&lt;br /&gt;AddType application/x-httpd-php .php ---&gt; AddType application/x-httpd-php .php .html&lt;br /&gt;&lt;br /&gt;2. If you don't have the access to httpd.conf you can write .htacees file as&lt;br /&gt;&lt;br /&gt;AddType application/x-httpd-php .php .htm .html&lt;br /&gt;&lt;br /&gt;and then restart the apache webserver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-9078421359540868008?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/9078421359540868008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/write-php-code-in-html-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9078421359540868008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/9078421359540868008'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/write-php-code-in-html-file.html' title='Write PHP Code in HTML File'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7347346392534283964</id><published>2010-04-13T18:54:00.000+05:30</published><updated>2010-04-13T18:54:44.403+05:30</updated><title type='text'>prototype.js / jQuery.js conflict and resolution</title><content type='html'>&lt;p&gt;when you use jQuery and prototype javascript frameworks togather on the same page, it creates conflicts.&lt;br /&gt;&lt;br /&gt;jQuery has provided a resolution to this conflict. The resolution goes as below:&lt;br /&gt;&lt;br /&gt;verriding the $-function:&lt;br /&gt;&lt;br /&gt;1) you can override that default by calling jQuery.noConflict() at any point after jQuery and the other library have both loaded. For example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script src="prototype.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src="jquery.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jQuery.noConflict();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use jQuery via jQuery(...)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jQuery(document).ready(function(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jQuery("div").hide();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use Prototype with $(...), etc.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $('someid').hide();&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Additionally, there's another option. If you want to make sure that&lt;br /&gt;jQuery won't conflict with another library - but you want the benefit&lt;br /&gt;of a short name, you could do something like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script src="prototype.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src="jquery.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $j = jQuery.noConflict();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use jQuery via $j(...)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j(document).ready(function(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $j("div").hide();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use Prototype with $(...), etc.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $('someid').hide();&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7347346392534283964?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7347346392534283964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/prototypejs-jqueryjs-conflict-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7347346392534283964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7347346392534283964'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/prototypejs-jqueryjs-conflict-and.html' title='prototype.js / jQuery.js conflict and resolution'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5295957247949265308</id><published>2010-04-08T10:14:00.002+05:30</published><updated>2010-04-13T12:30:52.230+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>PHP : Convert PDF Image file to JPEG Using Image magick</title><content type='html'>For this you need to&amp;nbsp; insatll Ghostscript first, you can download Ghostscript from &lt;a href="http://sourceforge.net/projects/ghostscript/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&amp;lt; ?php&lt;br /&gt;&lt;br /&gt;define('THUMB_WIDTH', 150);&lt;br /&gt;define('THUMB_HEIGHT', 212);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function makeThumbnail($in, $out) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $width = THUMB_WIDTH;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $height = THUMB_HEIGHT;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $identify = shell_exec("identify -verbose ".$in);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $matches = array();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $pattern = '/Geometry: ([0-9]{1,})x([0-9]{1,})/';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $result = preg_match($pattern, $identify, $matches);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if( $result &amp;amp;&amp;amp; count($matches) ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $h = $matches[1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $w =&amp;nbsp; $matches[2];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $thumbRatio = $width/$height;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $inRatio = $w/$h;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $isLandscape = $inRatio &amp;gt; $thumbRatio;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $size = ($isLandscape ? '1000x'.$height : $width.'x1000');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $xoff = ($isLandscape ? floor((($inRatio*$height)-$width)/2) : 0);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $command = system("convert $in -resize $size -crop {$width}x{$height}+{$xoff}+0 ".&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "-colorspace RGB -strip -quality 90 $out");&lt;br /&gt;&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec($command);&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $command;&lt;br /&gt;}&lt;br /&gt;$file = 'scan0001.pdf';&lt;br /&gt;$out = 'scan0001_thumb.jpg';&lt;br /&gt;makeThumbnail($file,$out);&lt;br /&gt;&lt;br /&gt;? &amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5295957247949265308?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5295957247949265308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/php-convert-pdf-image-file-to-jpeg.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5295957247949265308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5295957247949265308'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/php-convert-pdf-image-file-to-jpeg.html' title='PHP : Convert PDF Image file to JPEG Using Image magick'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4254191823733702507</id><published>2010-04-08T10:04:00.009+05:30</published><updated>2010-05-18T15:45:05.401+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Getting Image magick working on XAMPP for Windows</title><content type='html'>&amp;nbsp;First you'd download the newest binary release of Image Magick from &lt;a class="postlink" href="http://www.imagemagick.org/script/binary-releases.php#windows"&gt;http://www.imagemagick.org/script/binary-releases.php#windows&lt;/a&gt;. The typical version you'd want to snag will end with Q16-windows-dll.exe. For example, the version I downloaded was ImageMagick-6.4.9-4-Q16-windows-dll.exe. Install Image Magick.&lt;br /&gt;&lt;br /&gt;After that you need to download php_imagick_dyn-Q16.dll from &lt;a href="http://www.filefactory.com/dlf/f/b1bdfh7/b/1/h/67f2c364ec2d9338724950ddf31570e51d5f8d3e/j/0/n/php_imagick.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;if you did not find any php_imagick.zip file just refresh once on above URL.&lt;br /&gt;&lt;br /&gt;Once you have download &amp;nbsp; php_imagick_dyn-Q16.dll file put this in &lt;b&gt;xampp/php/ext&lt;/b&gt; or &lt;b&gt;php/extension&lt;/b&gt; folder.&lt;br /&gt;&lt;br /&gt;Then open php.ini and add &lt;b&gt;extension=php_imagick_dyn-Q16.dll.&lt;/b&gt;and comment &lt;b&gt;extension=php_imagick.dll &lt;/b&gt;if it is already not commented .&lt;br /&gt;&lt;br /&gt;And just restart your server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4254191823733702507?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4254191823733702507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/getting-image-magick-working-on-xampp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4254191823733702507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4254191823733702507'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/getting-image-magick-working-on-xampp.html' title='Getting Image magick working on XAMPP for Windows'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>0.4022280000000009 49.0800675 40.78514 108.8456925</georss:box></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3551660083375596290</id><published>2010-04-06T20:52:00.000+05:30</published><updated>2010-04-06T20:52:33.156+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><title type='text'>Opening a file download dialog from a JavaScript function</title><content type='html'>&lt; script type="text/javascipt" &gt;  &lt;br /&gt;   function startDownload()  &lt;br /&gt;  {  &lt;br /&gt;    var url='http://server/folder/file.ext';    &lt;br /&gt;    window.open(url,'Download');  &lt;br /&gt;    }  &lt;br /&gt;   &lt; /script &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3551660083375596290?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3551660083375596290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/opening-file-download-dialog-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3551660083375596290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3551660083375596290'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/opening-file-download-dialog-from.html' title='Opening a file download dialog from a JavaScript function'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8637661130636558299</id><published>2010-04-06T15:45:00.001+05:30</published><updated>2010-04-06T15:45:52.402+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><title type='text'>hide JavaScript errors from the user</title><content type='html'>$(window).error(function(){&lt;br /&gt;  return true;&lt;br /&gt;});&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8637661130636558299?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8637661130636558299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/hide-javascript-errors-from-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8637661130636558299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8637661130636558299'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/hide-javascript-errors-from-user.html' title='hide JavaScript errors from the user'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4579691314247714397</id><published>2010-04-06T14:17:00.001+05:30</published><updated>2010-04-06T14:17:57.593+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>PHP File Download</title><content type='html'>// place this code inside a php file and call it f.e. "download.php"&lt;br /&gt;$path = $_SERVER['DOCUMENT_ROOT']."/path2file/"; // change the path to fit your websites document structure&lt;br /&gt;$fullPath = $path.$_GET['download_file'];&lt;br /&gt; &lt;br /&gt;if ($fd = fopen ($fullPath, "r")) {&lt;br /&gt;    $fsize = filesize($fullPath);&lt;br /&gt;    $path_parts = pathinfo($fullPath);&lt;br /&gt;    $ext = strtolower($path_parts["extension"]);&lt;br /&gt;    switch ($ext) {&lt;br /&gt;        case "pdf":&lt;br /&gt;        header("Content-type: application/pdf"); // add here more headers for diff. extensions&lt;br /&gt;        header("Content-Disposition: attachment; filename=\"".$path_parts["basename"]."\""); // use 'attachment' to force a download&lt;br /&gt;        break;&lt;br /&gt;        default;&lt;br /&gt;        header("Content-type: application/octet-stream");&lt;br /&gt;        header("Content-Disposition: filename=\"".$path_parts["basename"]."\"");&lt;br /&gt;    }&lt;br /&gt;    header("Content-length: $fsize");&lt;br /&gt;    header("Cache-control: private"); //use this to open files directly&lt;br /&gt;    while(!feof($fd)) {&lt;br /&gt;        $buffer = fread($fd, 2048);&lt;br /&gt;        echo $buffer;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;fclose ($fd);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4579691314247714397?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4579691314247714397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/04/php-file-download.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4579691314247714397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4579691314247714397'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/04/php-file-download.html' title='PHP File Download'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-4323666253581747459</id><published>2010-03-31T10:24:00.000+05:30</published><updated>2010-03-31T10:27:21.301+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Beginning SSH on Ubuntu</title><content type='html'>Installing OpenSSH&lt;br /&gt;&lt;br /&gt;The Ubuntu (and MacOS X) flavor of SSH is called OpenSSH, a free, open-source implementation of the ssh protocol. It consists of two basic components, an openssh-client and an openssh-server. SSH clients communicate with SSH servers over encrypted network connections.&lt;br /&gt;&lt;br /&gt;The openssh-client software should already be installed by default on Ubuntu. If you want to be able to accept SSH connections as well as request them, you’ll need the server software as well. The easiest way to ensure you have both is simply to run:&lt;br /&gt;&lt;br /&gt;sudo apt-get install openssh-client openssh-server&lt;br /&gt;&lt;br /&gt;Using SSH to Log into a Remote Computer&lt;br /&gt;&lt;br /&gt;Once OpenSSH is installed, you can login to a remote SSH server by using the ssh command:&lt;br /&gt;&lt;br /&gt;ssh remoteuser@remotebox&lt;br /&gt;&lt;br /&gt;where remoteuser is the username of the remote account you’re trying to access, and remotebox is the remote server’s hostname or IP address.&lt;br /&gt;&lt;br /&gt;For example, if you know that your Kubuntu desktop box (now running openssh-server) has a user account named joebanks and that the IP address of that computer on your private LAN is 192.168.0.12, you could login remotely to that account from your Linux/Mac laptop by typing:&lt;br /&gt;&lt;br /&gt;ssh joebanks@192.168.0.12&lt;br /&gt;&lt;br /&gt;If you’re unsure of a computer’s local IP address, try running ifconfig on that machine. This will display the status of the active network interfaces, and the local IP address of that device will be listed after inet addr. It will most likely be in the form of 192.168.0.xx.&lt;br /&gt;&lt;br /&gt;Or, if you’ve got a web hosting account that allows shell access (e.g., DreamHost) with a domain name like cooldomain.com, your syntax might look like:&lt;br /&gt;&lt;br /&gt;ssh joebanks@cooldomain.com&lt;br /&gt;&lt;br /&gt;Now, the first time an SSH client encounters a new remote server, it will report that it’s never seen the machine before, by printing the following message:&lt;br /&gt;&lt;br /&gt;The authenticity of host 'remotebox (192.168.0.12)' can't be established.&lt;br /&gt;RSA key fingerprint is 53:b4:ad:c8:51:17:99:4b:c9:08:ac:c1:b6:05:71:9b.&lt;br /&gt;Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;&lt;br /&gt;This is just an extra security measure to ensure that you’re actually connecting to the machine you think you are. If you type yes (the most common response), you’ll see the following:&lt;br /&gt;&lt;br /&gt;Warning: Permanently added 'remotebox' (RSA) to the list of known hosts.&lt;br /&gt;&lt;br /&gt;Subsequent login attempts to this machine will omit the warning message. You’ll then be asked for the remoteuser’s password:&lt;br /&gt;&lt;br /&gt;remoteuser@remotebox's password:&lt;br /&gt;&lt;br /&gt;And after correctly entering it, like magic, you’ll be logged into the remote machine, and instead of your local machine’s command prompt, you’ll see the following:&lt;br /&gt;&lt;br /&gt;remoteuser@remotebox:~$&lt;br /&gt;&lt;br /&gt;And, voila! You can execute commands on the remote machine just as you would on your local box. To close the connection to the remote server, type exit, or use Ctrl-D.&lt;br /&gt;&lt;br /&gt;Copying Files&lt;br /&gt;&lt;br /&gt;To transfer files and directories from your local machine to the remote server and vice-versa, you’ll use SSH’s “secure copy” command, or scp. To copy a single file from your local machine to the server, use the following syntax:&lt;br /&gt;&lt;br /&gt;scp file.txt remoteuser@remotebox:/directory&lt;br /&gt;&lt;br /&gt;where file.txt is the name of a file in the current directory of your local machine, remoteuser@remotebox is the username and hostname or IP address of the server (just like in the above ssh examples, and /directory is the directory path on the server where you want your file copied.&lt;br /&gt;&lt;br /&gt;For example, if you want to copy the local file.txt to the /home/joebanks/docs directory on the server you logged into above, you’ll run the following command from a local terminal session:&lt;br /&gt;&lt;br /&gt;scp file.txt joebanks@192.168.0.12:/home/joebanks/docs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can be as verbose as you want with the local and remote filenames and directories, even changing the filename in the process, like so:&lt;br /&gt;&lt;br /&gt;scp ~/docs/oldfile.txt joebanks@192.168.0.12:/home/joebanks/docs/newfile.txt&lt;br /&gt;&lt;br /&gt;To copy a file from the server to your local machine, use the following syntax:&lt;br /&gt;&lt;br /&gt;scp remoteuser@remotebox:file.txt /local/directory&lt;br /&gt;&lt;br /&gt;where remoteuser@remotebox is the username and hostname or IP address of the server, file.txt is a file in the /home/remoteuser directory, and /local/directory is the local directory path into which the file will be copied.&lt;br /&gt;&lt;br /&gt;Again, you can be as verbose as necessary, for example:&lt;br /&gt;&lt;br /&gt;scp joebanks@192.168.0.12:~/docs/newfile.txt /home/joe/downloads&lt;br /&gt;&lt;br /&gt;Copying Directories&lt;br /&gt;&lt;br /&gt;To copy an entire directory (and all of its contents) from the local machine to the remote server, use the recursive -r switch, like so:&lt;br /&gt;&lt;br /&gt;scp -r /local/directory remoteuser@remotebox:/remote/directory&lt;br /&gt;&lt;br /&gt;where /local/directory is the path to the local directory you want copied, and /remote/directory is the remote directory into which you want the directory to be copied.&lt;br /&gt;&lt;br /&gt;To copy an entire directory (and all of its contents) from the remote server to the local machine, use the following:&lt;br /&gt;&lt;br /&gt;scp -r remoteuser@remotebox:/remote/directory /local/directory&lt;br /&gt;&lt;br /&gt;where /remote/directory is the path to the remote directory you want copied, and /local/directory is the local directory into which you want the directory to be copied.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-4323666253581747459?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/4323666253581747459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/beginning-ssh-on-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4323666253581747459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/4323666253581747459'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/beginning-ssh-on-ubuntu.html' title='Beginning SSH on Ubuntu'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7847237405972113881</id><published>2010-03-30T18:23:00.000+05:30</published><updated>2010-03-30T18:25:44.555+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>PHPMyAdmin Installation on Fedora</title><content type='html'>&lt;b&gt;Step One&lt;/b&gt;&lt;br /&gt;To install PHPMyAdmin using yum, simply issue&lt;br /&gt;# yum -y install phpMyAdmin.noarch&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step Two&lt;/span&gt;&lt;br /&gt;&lt;b&gt;PHPMyAdmin Security Access&lt;/b&gt;&lt;br /&gt;By default installation, phpmyadmin administration page can only be accessed from localhost via web browser for added security. If you wish to access phpmyadmin page from multiple hosts, modify phpmyadmin conf page as shown below&lt;br /&gt;# vi /etc/httpd/conf.d/phpMyAdmin.conf&lt;br /&gt;and edit the necessary settings. For example, if you require phpmyadmin web page to be accessible from a computer host with an IP address of 123.123.123.123, edit phpMyAdmin.conf to reflect the below similar lines&lt;br /&gt;#order deny,allow&lt;br /&gt;#deny from all&lt;br /&gt;Allow from All&lt;br /&gt;allow from 127.0.0.1&lt;br /&gt;allow from 123.123.123.123&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and next add the Allow from All Line&lt;br /&gt;&lt; Directory /usr/share/phpMyAdmin/libraries &gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; Order Deny,Allow &lt;br /&gt;&amp;nbsp;&amp;nbsp; Allow from All&lt;br /&gt;&amp;lt; /Directory&amp;gt;&lt;br /&gt;Save, exit and reload apache web server.&lt;br /&gt;# service httpd restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7847237405972113881?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7847237405972113881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/phpmyadmin-installation-on-fedora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7847237405972113881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7847237405972113881'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/phpmyadmin-installation-on-fedora.html' title='PHPMyAdmin Installation on Fedora'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-5409492278987669820</id><published>2010-03-25T18:08:00.000+05:30</published><updated>2010-03-25T18:19:50.291+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Enable mode_rewrite module in xampp</title><content type='html'>If you running XAMPP on Windows and unable to figure out how to enable mod_rewrite in apache then here is the solution and it is very simple&lt;br /&gt;&lt;br /&gt;Search for httpd.conf file in xampp folder it should be located at xampp/apache/conf and open file in any editor and search for below line:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#LoadModule rewrite_module modules/mod_rewrite.so&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;and just remove the "#" symbol then it will be like &lt;br /&gt;&lt;br /&gt;&lt;b&gt;LoadModule rewrite_module modules/mod_rewrite.so&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next, search for &lt;b&gt;"AllowOverride None"&lt;/b&gt; and change it to &lt;b&gt;"AllowOverride All"&lt;/b&gt;. It is correct once and wrong twice in the file.&lt;br /&gt;&lt;br /&gt;Once you have made these changes, save httpd.conf file and &lt;b&gt;restart Apache&lt;/b&gt; for mod_rewrite to take effect.&lt;br /&gt;&lt;div id="TixyyLink" style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-5409492278987669820?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/5409492278987669820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/enable-moderewrite-module-in-xampp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5409492278987669820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/5409492278987669820'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/enable-moderewrite-module-in-xampp.html' title='Enable mode_rewrite module in xampp'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1357413431334959824</id><published>2010-03-23T12:32:00.000+05:30</published><updated>2010-03-23T13:46:40.348+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Iframe Popup'/><title type='text'>Iframe Popup's</title><content type='html'>&lt;p&gt;&amp;lt;span style="color: #330099; font-weight: bold;"&amp;gt;This is the Ifram panel which has to be written in Aspx page or Masterpage&amp;lt;/span&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:panel borderstyle="None" id="pnlPopup" runat="server" style="display: none;"&amp;gt;&lt;br /&gt;&amp;lt;iframe frameborder="0" id="ifrmPopup" runat="server" style="border: 0pt none; height: 500px; width: 800px;"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;&amp;lt;/asp:panel&amp;gt;&lt;br /&gt;&amp;lt;ajaxtoolkit:modalpopupextender backgroundcssclass="modalpopupclass" id="mpePopup" popupcontrolid="pnlPopup" runat="server" targetcontrolid="hdnMPE"&amp;gt;&lt;br /&gt;&amp;lt;/ajaxtoolkit:modalpopupextender&amp;gt;&lt;br /&gt;&amp;lt;asp:button id="hdnMPE" runat="server" style="display: none;"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;span style="color: #330099; font-weight: bold;"&amp;gt;===&amp;nbsp; Script for opening popup&amp;nbsp; ====&amp;lt;/span&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;function funPopup(id) {&lt;br /&gt;&lt;br /&gt;var frm = document.getElementById('ctl00_ContentPlaceHolder1_ifrmPopup');&lt;br /&gt;frm.src = "../ModalPopups/Delete.aspx"; &amp;lt;span style="color: rgb(51, 0, 153);"&amp;gt; (Your page URL which has to be opened)&amp;lt;/span&amp;gt;&lt;br /&gt;frm.style.height = "220px";&lt;br /&gt;frm.style.width = "750px";&lt;br /&gt;var obj1 = $find('ctl00_ContentPlaceHolder1_mpePopup');&lt;br /&gt;if (obj1 != null) {&lt;br /&gt;obj1.show();&lt;br /&gt;}&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;================&amp;nbsp; Popup css ==================&lt;br /&gt;&lt;br /&gt;.modalpopupclass&lt;br /&gt;{&lt;br /&gt;background-color:Gray;&lt;br /&gt;filter:alpha(opacity=40);&lt;br /&gt;opacity:0.4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;================ Add in webConfig&amp;nbsp; ============&lt;br /&gt;&lt;br /&gt;&amp;lt;add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;================ Method to call for image ===========&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:imagebutton id="img" imagealign="Middle" imageurl="~/Images/Image.gif" runat="server"&amp;gt;&lt;br /&gt;&lt;br /&gt;===============&amp;nbsp; .cs (Page Load)&amp;nbsp; ===========&lt;br /&gt;&lt;br /&gt;imgDelete.Attributes.Add("onclick", "javascript:return funPopup()");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;span style="color: #330099; font-weight: bold;"&amp;gt;=====For closing popup (this has to be written in popup.aspx page)====== &amp;lt;/span&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;function funPopupClose() {&lt;br /&gt;window.parent.document.getElementById('ctl00_ContentPlaceHolder1_ifrmPopup').src = "";&lt;br /&gt;var objF = window.parent.$find('ctl00_ContentPlaceHolder1_mpePopup');&lt;br /&gt;objF.hide();&lt;br /&gt;//window.parent.document.forms[0].submit();&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&amp;lt;/asp:imagebutton&amp;gt;&amp;lt;/add&amp;gt;&amp;lt;/asp:button&amp;gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1357413431334959824?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1357413431334959824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/this-is-ifram-panel-which-has-to-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1357413431334959824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1357413431334959824'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/this-is-ifram-panel-which-has-to-be.html' title='Iframe Popup&apos;s'/><author><name>SeetharamaiahChowdhary</name><uri>http://www.blogger.com/profile/17827469293826541718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1738295178090407977</id><published>2010-03-23T11:34:00.000+05:30</published><updated>2010-03-23T11:34:01.141+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Free Google Gadgets For Your Website</title><content type='html'>&lt;a href="http://www.google.com/ig/directory?synd=open&amp;amp;cat=all"&gt;Here&lt;/a&gt; you can find the Gadgets from Goolgle which you can integrate in website very easily.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1738295178090407977?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1738295178090407977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/free-google-gadgets-for-your-website.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1738295178090407977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1738295178090407977'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/free-google-gadgets-for-your-website.html' title='Free Google Gadgets For Your Website'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2188256948323547220</id><published>2010-03-22T18:36:00.000+05:30</published><updated>2010-03-22T18:39:12.596+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><title type='text'>Create Multisite in Drupal</title><content type='html'>To create multisite in drupal we need to change hosts configuration file as follows:&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;i&gt;Windows/System32/drivers/etc&lt;/i&gt;/hosts&lt;/i&gt;&lt;/b&gt; (for windows)&lt;br /&gt;And add new line like&lt;br /&gt;&lt;code&gt;127.0.0.1 loclahost&lt;/code&gt; &lt;br /&gt;&lt;code&gt;127.0.0.1 subdomain&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;after that just craete a folder called subdomian in drupal6/sites, then copy the settings.php file in newly created folder.Once done all the above steps Just type the URL like &lt;b&gt;http;//subdomain/drupal6&lt;/b&gt; in your browser then it will install new site. &lt;br /&gt;&lt;br /&gt;If you want to create a url like just http://subdomain then you need create the Virtualhost in httpd.conf file like,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;virtualhost *:80=""&gt;&lt;/virtualhost&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;virtualhost *:80=""&gt;&amp;lt; VirtualHost *:80 &amp;gt;&lt;br /&gt;DocumentRoot C:/xampp/htdocs/drupal6&lt;br /&gt;ServerName subdomain&lt;/virtualhost&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;virtualhost *:80=""&gt;&amp;lt; /VirtualHost &amp;gt; &lt;/virtualhost&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2188256948323547220?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2188256948323547220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/create-multisite-in-drupal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2188256948323547220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2188256948323547220'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/create-multisite-in-drupal.html' title='Create Multisite in Drupal'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-6566310162170052443</id><published>2010-03-22T14:32:00.001+05:30</published><updated>2010-06-02T14:55:00.870+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MYSQL'/><title type='text'>Backup Mysql Database From Commandline</title><content type='html'>&lt;b&gt;&amp;nbsp;&lt;/b&gt;Backing up your database is something you should do often. Like most things, there are a lot of ways to do this, but using the command-line is one of the best. Why? Because it helps you get around potential problems like execution timeouts for tools like phpMyAdmin, and potential network dropouts from using a local administration tool like MySQL Workbench.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mysqldump -h localhost -u username -p database_name &amp;gt; backup_db.sql&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;take a backup in compress mode:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;mysqldump -u username -h localhost -p database_name | gzip -9 &amp;gt; backup_db.sql.gz&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(OR)&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: courier new,courier;"&gt;mysqldump -u &lt;i&gt;username&lt;/i&gt; -p &lt;i&gt;database_name&amp;nbsp;|&lt;/i&gt; gzip -c&lt;i&gt; backup.sql.gz&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, to explain what’s going on here! The “mysqldump” program is a tool for creating database backups. The parameters being used are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;“-u” switch means you’re going to specify a username to connect with, which must follow, like “-u mysqluser” above&lt;/li&gt;&lt;li&gt;“-p” switch means you’re either going to immediately specify the password to use (with no space), or it’ll prompt you for one&lt;/li&gt;&lt;li&gt;The final parameter used in the example above is the name of the database to backup (of course!)&lt;/li&gt;&lt;/ul&gt;If you ran the command above, you would’ve seen the contents of your database go whizzing by on the screen. That’s good, because we know that part works (actually connecting to the database), but it’s also bad, because… where did it go? Answer: nowhere! It scrolled past, and that was it. Now we need to capture it and put it in a file.&lt;br /&gt;To place the contents of the output into a file, for back-up purposes, we need to use what’s called a &lt;strong&gt;redirection&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-6566310162170052443?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/6566310162170052443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/backup-mysql-database-from-commandline.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6566310162170052443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/6566310162170052443'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/backup-mysql-database-from-commandline.html' title='Backup Mysql Database From Commandline'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3114068585988266933</id><published>2010-03-22T11:39:00.000+05:30</published><updated>2010-03-22T11:39:02.859+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Convert Array to XML format</title><content type='html'>function print_r_xml($arr,$wrapper="data",$cycle = 1)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //useful vars&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $new_line = "\n";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //start building content&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($cycle == 1) { $output = '&amp;lt;\?xml version="1.0" encoding="UTF-8" ?&amp;gt;'.$new_line; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output.= tabify($cycle - 1)."&amp;lt;".$wrapper."&amp;gt;".$new_line; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($arr as $key =&amp;gt; $val)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(!is_array($val))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $output.= tabify($cycle).'&amp;lt;'.htmlspecialchars($key).'&amp;gt;'.$val.'&amp;lt;/'.htmlspecialchars($key).'&amp;gt;'.$new_line;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $output.= print_r_xml($val,$key,$cycle + 1).$new_line;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output.= tabify($cycle - 1).'&amp;lt;/'.$wrapper.'&amp;gt;';&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return the value&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $output;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* tabify */&lt;br /&gt;function tabify($num_tabs)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($x = 1; $x &amp;lt;= $num_tabs; $x++) { $return.= "\t"; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* test */&lt;br /&gt;$_POST = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'first_name'=&amp;gt;'Faruq',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'last_name'=&amp;gt;'Shaik',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'url'=&amp;gt;'http://faruq1256.blogspot.com',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'languages'=&amp;gt;array('php','javascript','Python','Ruby'),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'title'=&amp;gt;'Web Developer',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'favorite'=&amp;gt;array('PHP'=&amp;gt;'http://php.net','Jquery'=&amp;gt;'http://jquery.com')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;echo print_r_xml($_POST);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3114068585988266933?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3114068585988266933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/convert-array-to-xml-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3114068585988266933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3114068585988266933'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/convert-array-to-xml-format.html' title='Convert Array to XML format'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-7924905574567431659</id><published>2010-03-18T17:39:00.000+05:30</published><updated>2010-03-18T17:39:57.680+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Take Full Backup From cPanel By PHP Script</title><content type='html'>Make one php file and give it to name whatever you want like details_cp.php, this file is just for details of your cPanel and FTP and other things. So the content of details_cp.php would be given below&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt; $cpuser = &amp;ldquo;cpanel username&amp;rdquo;; //cPanel Username&lt;br /&gt; $cppass = &amp;ldquo;cpanel Password&amp;rdquo;; //cPanel Username&lt;br /&gt; $domain = &amp;ldquo;yourdomain.com&amp;rdquo;; // Domain name you want to take backup&lt;br /&gt; $skin = &amp;ldquo;x2&amp;Prime;; // no need to change&lt;/p&gt;&lt;p&gt;$ftpuser = &amp;ldquo;FTP username&amp;rdquo;; // FTP username&lt;br /&gt; $ftppass = &amp;ldquo;FTP password&amp;rdquo;; // FTP username&lt;br /&gt; $ftphost = &amp;ldquo;FTP host&amp;rdquo;; // FTP Host&lt;br /&gt; $ftpmode = &amp;ldquo;passiveftp&amp;rdquo;;&lt;br /&gt; $ftpdir = &amp;ldquo;/subdir&amp;rdquo;;&lt;/p&gt;&lt;p&gt;$notifyemail = &amp;ldquo;webmaster@mydomain.com&amp;rdquo;; // Email which will use in case of any error.&lt;/p&gt;&lt;p&gt;$delbackup = 1;&lt;/p&gt;&lt;p&gt;$secure = 0; // If you are using secure ssl connection&lt;/p&gt;&lt;p&gt;$debug = 0;&lt;br /&gt; ?&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;After that you have to create second file, which is then main backup script, &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt; &lt;span style="color: #ff0000;"&gt;include(&amp;lsquo;details_cp.php&amp;rsquo;);&lt;/span&gt;&lt;br /&gt; if ($secure) {&lt;br /&gt; $url = &amp;ldquo;ssl://&amp;rdquo;.$domain;&lt;br /&gt; $port = 2083;&lt;br /&gt; } else {&lt;br /&gt; $url = $domain;&lt;br /&gt; $port = 2082;&lt;br /&gt; }&lt;/p&gt;&lt;p&gt;if ($delbackup) {&lt;br /&gt; $conn_id = ftp_connect($ftphost);&lt;br /&gt; if ($conn_id) {&lt;br /&gt; $ok = ftp_login($conn_id, $ftpuser, $ftppass);&lt;br /&gt; if ($ok) {&lt;br /&gt; if (!empty($ftpdir)) {&lt;br /&gt; $ok = ftp_chdir($conn_id,$ftpdir);&lt;br /&gt; }&lt;br /&gt; if ($ok) {&lt;br /&gt; $dirlist = ftp_nlist($conn_id, &amp;ldquo;backup*&amp;rdquo;);&lt;br /&gt; if (!empty($dirlist[0])) @ftp_delete($conn_id,$dirlist[0]);&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt; ftp_close($conn_id);&lt;br /&gt; }&lt;br /&gt; }&lt;/p&gt;&lt;p&gt;$socket = fsockopen($url,$port);&lt;br /&gt; if (!$socket) { echo &amp;ldquo;Cannot connect to $url\n&amp;rdquo;; exit; }&lt;br /&gt; $authstr = $cpuser.&amp;rdquo;:&amp;rdquo;.$cppass;&lt;br /&gt; $pass = base64_encode($authstr);&lt;br /&gt; $request_data = &amp;ldquo;dest=&amp;rdquo;.urlencode($ftpmode).&amp;rdquo;&amp;amp;email=&amp;rdquo;.urlencode($notifyemail);&lt;br /&gt; $request_data .= &amp;ldquo;&amp;amp;server=&amp;rdquo;.urlencode($ftphost).&amp;rdquo;&amp;amp;user=&amp;rdquo;.urlencode($ftpuser);&lt;br /&gt; $request_data .= &amp;ldquo;&amp;amp;pass=&amp;rdquo;.urlencode($ftppass);&lt;br /&gt; if (!empty($ftpdir)) $request_data .= &amp;ldquo;&amp;amp;rdir=&amp;rdquo;.urlencode($ftpdir);&lt;br /&gt; $request_data .= &amp;ldquo;&amp;amp;submit=&amp;rdquo;.urlencode(&amp;lsquo;Generate Backup&amp;rsquo;);&lt;/p&gt;&lt;p&gt;fputs($socket,&amp;rdquo;POST /frontend/&amp;rdquo;.$skin.&amp;rdquo;/backup/dofullbackup.html HTTP/1.1\r\n&amp;rdquo;);&lt;br /&gt; fputs($socket,&amp;rdquo;Host: $domain\r\n&amp;rdquo;);&lt;br /&gt; fputs($socket,&amp;rdquo;Authorization: Basic $pass\r\n&amp;rdquo;);&lt;br /&gt; fputs($socket,&amp;rdquo;Content-type: application/x-www-form-urlencoded\r\n&amp;rdquo;);&lt;br /&gt; fputs($socket,&amp;rdquo;Content-length: &amp;ldquo;.strlen($request_data).&amp;rdquo;\r\n\r\n&amp;rdquo;.$request_data);&lt;/p&gt;&lt;p&gt;while (!feof($socket)) {&lt;br /&gt; $response = fgets($socket,4096);&lt;br /&gt; if ($debug) echo $response;&lt;br /&gt; }&lt;br /&gt; fclose($socket);&lt;br /&gt; ?&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;Then  upload these to files and just run backup_cp.php it will create the .zip file in our root directory&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-7924905574567431659?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/7924905574567431659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/take-full-backup-from-cpanel-by-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7924905574567431659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/7924905574567431659'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/take-full-backup-from-cpanel-by-php.html' title='Take Full Backup From cPanel By PHP Script'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-2472874850624509548</id><published>2010-03-16T14:07:00.002+05:30</published><updated>2010-04-09T10:47:45.015+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Jquery'/><title type='text'>Jquery: Ajax Function</title><content type='html'>$.ajax({&lt;br /&gt;type: "POST",&lt;br /&gt;url: "some.php",&lt;br /&gt;data: "name=John&amp;amp;location=Boston",&lt;br /&gt;success: function(msg){&lt;br /&gt;alert( "Data Saved: " + msg );&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;for more detailed Information:&lt;br /&gt;http://api.jquery.com/jQuery.ajax/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-2472874850624509548?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/2472874850624509548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/jquery-ajax-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2472874850624509548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/2472874850624509548'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/jquery-ajax-function.html' title='Jquery: Ajax Function'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-124147981617239976</id><published>2010-03-15T14:28:00.000+05:30</published><updated>2010-03-15T14:28:23.658+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><title type='text'>JS:Bookmark &amp; Share Widget</title><content type='html'>&amp;lt; a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;amp;username=xa-4b9df5e0641b728d"&amp;gt;&amp;lt; img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0" /&amp;gt;&lt;script src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b9df5e0641b728d" type="text/javascript"&gt;&lt; /script &gt;&lt;/p&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;For more Information:&lt;br /&gt;&lt;b&gt;http://www.addthis.com/&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-124147981617239976?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/124147981617239976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/jsbookmark-share-widget.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/124147981617239976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/124147981617239976'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/jsbookmark-share-widget.html' title='JS:Bookmark &amp; Share Widget'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-8029277360815611787</id><published>2010-03-11T14:25:00.000+05:30</published><updated>2010-03-11T14:35:47.897+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Google API: Add a YouTube Video to Your Web Site</title><content type='html'>&amp;lt;object width="425" height="344"&amp;gt;&lt;br /&gt;&amp;lt;param name="movie" value="http://www.youtube.com/v/GwQMnpUsj8I&amp;amp;hl=en&amp;amp;fs=1"&amp;gt;&lt;br /&gt;&amp;lt;/param&amp;gt;&amp;lt;param name="allowFullScreen" value="true"&amp;gt;&lt;br /&gt;&amp;lt;/param&amp;gt;&amp;lt;param name="allowscriptaccess" value="always"&amp;gt;&lt;br /&gt;&amp;lt;/param&amp;gt;&amp;lt;embed src=http://www.youtube.com/v/GwQMnpUsj8I&amp;amp;hl=en&amp;amp;fs=1 &lt;br /&gt;type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&amp;gt;&lt;br /&gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;&lt;br /&gt;&lt;br /&gt;for more details:&lt;br /&gt;http://code.google.com/apis/youtube/player_parameters.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-8029277360815611787?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/8029277360815611787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-add-youtube-video-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8029277360815611787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/8029277360815611787'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-add-youtube-video-to-your.html' title='Google API: Add a YouTube Video to Your Web Site'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-500334368017001131</id><published>2010-03-11T11:07:00.001+05:30</published><updated>2010-03-11T11:09:23.997+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Google API: An AJAX Currency Converter</title><content type='html'>&amp;lt;script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;!-- when using Google to load JSON API --&amp;gt;&lt;br /&gt;&amp;lt;script src="http://www.google.com/jsapi" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src="http://www.geoplugin.net/ajax_currency_converter.gp" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;!-- When using your own JSON API --&amp;gt;&lt;br /&gt;&amp;lt;!-- &amp;lt;script src="http://www.geoplugin.net/ajax_currency_converter.gp?nogoog=1" type="text/javascript"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt; --&amp;gt;&lt;br /&gt;&amp;lt;input type='text' id='gp_amount' size='4' /&amp;gt; &lt;br /&gt;&amp;lt;select id="gp_from"&amp;gt;&amp;lt;/select&amp;gt; to &amp;lt;select id="gp_to"&amp;gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;input type='button' onClick='gp_convertIt()' value = 'Convert It' /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;div id="gp_converted"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;gp_currencySymbols()&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;For more information:&lt;br /&gt;&lt;pre class="code"&gt;&lt;a href="http://www.geoplugin.com/" target="_new" title="geoPlugin for IP geolocation"&gt;Geolocation by geoPlugin&lt;/a&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-500334368017001131?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/500334368017001131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-ajax-currency-converter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/500334368017001131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/500334368017001131'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-ajax-currency-converter.html' title='Google API: An AJAX Currency Converter'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-1679773871752492520</id><published>2010-03-11T11:05:00.001+05:30</published><updated>2010-03-11T11:05:36.206+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Google API: Embedding a Google Map</title><content type='html'>&lt;pre class="code javascript"&gt;&lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;html&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;head&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;script src=&lt;span class="st0"&gt;"http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=Your_Google_Maps_API_Key"&lt;/span&gt; type=&lt;span class="st0"&gt;"text/javascript"&lt;/span&gt;&lt;span class="sy0"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;script&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;script language=&lt;span class="st0"&gt;"JavaScript"&lt;/span&gt; src=&lt;span class="st0"&gt;"http://www.geoplugin.net/javascript.gp"&lt;/span&gt; type=&lt;span class="st0"&gt;"text/javascript"&lt;/span&gt;&lt;span class="sy0"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;script&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;script type=&lt;span class="st0"&gt;"text/javascript"&lt;/span&gt;&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; load&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;GBrowserIsCompatible&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kw2"&gt;var&lt;/span&gt; map = &lt;span class="kw2"&gt;new&lt;/span&gt; GMap2&lt;span class="br0"&gt;(&lt;/span&gt;document.&lt;span class="me1"&gt;getElementById&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"map"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.&lt;span class="me1"&gt;addControl&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;new&lt;/span&gt; GLargeMapControl&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.&lt;span class="me1"&gt;addControl&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;new&lt;/span&gt; GMapTypeControl&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.&lt;span class="me1"&gt;setCenter&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;new&lt;/span&gt; GLatLng&lt;span class="br0"&gt;(&lt;/span&gt;geoplugin_latitude&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;, geoplugin_longitude&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;, &lt;span class="nu0"&gt;12&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;/&lt;/span&gt;script&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="sy0"&gt;&amp;lt;/&lt;/span&gt;head&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;body&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;div id=&lt;span class="st0"&gt;"map"&lt;/span&gt; style=&lt;span class="st0"&gt;"width: 500px; height: 300px"&lt;/span&gt;&lt;span class="sy0"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;div&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;script&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;load&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;span class="sy0"&gt;&amp;lt;/&lt;/span&gt;script&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="sy0"&gt;&amp;lt;/&lt;/span&gt;body&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="sy0"&gt;&amp;lt;/&lt;/span&gt;html&lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-1679773871752492520?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/1679773871752492520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-embedding-google-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1679773871752492520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/1679773871752492520'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-embedding-google-map.html' title='Google API: Embedding a Google Map'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2723064088198962914.post-3943628096836442926</id><published>2010-03-11T11:01:00.000+05:30</published><updated>2010-03-11T11:02:53.240+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google API'/><title type='text'>Google API: Your own personalized weather forecast</title><content type='html'>&lt;pre class="code php"&gt;This code requires the &lt;a class="urlextern" href="http://www.phpclasses.org/browse/package/4472.html" rel="nofollow" target="_new" title="http://www.phpclasses.org/browse/package/4472.html"&gt;ParseXml class&lt;/a&gt;.&lt;br /&gt;&lt;span class="kw2"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="code php"&gt;&lt;span class="kw2"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="code php"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class="re1"&gt;$geoplugin&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="kw3"&gt;unserialize&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt; &lt;span class="kw3"&gt;file_get_contents&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;'http://www.geoplugin.net/php.gp?ip='&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$_SERVER&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt; &lt;span class="kw3"&gt;is_numeric&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_latitude'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="sy0"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="kw3"&gt;is_numeric&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_longitude'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$lat&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_latitude'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$long&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_longitude'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="co1"&gt;//set farenheight for US&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_countryCode'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;==&lt;/span&gt; &lt;span class="st0"&gt;'US'&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$tempScale&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;'fahrenheit'&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$tempUnit&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;'&amp;amp;deg;F'&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;span class="kw1"&gt;else&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$tempScale&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;'celsius'&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$tempUnit&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;'&amp;amp;deg;C'&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="kw1"&gt;require_once&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;'ParseXml.class.php'&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$xml&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="kw2"&gt;new&lt;/span&gt; ParseXml&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$xml&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;LoadRemote&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query={$lat},{$long}"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="nu0"&gt;3&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$dataArray&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="re1"&gt;$xml&lt;/span&gt;&lt;span class="sy0"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="me1"&gt;ToArray&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;center&amp;gt;&amp;lt;h2&amp;gt;Weather forecast for "&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$geoplugin&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'geoplugin_city'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;/h2&amp;gt;&amp;lt;table cellpadding=5 cellspacing=10&amp;gt;&amp;lt;tr&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="kw1"&gt;foreach&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re1"&gt;$dataArray&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'simpleforecast'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'forecastday'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="kw1"&gt;as&lt;/span&gt; &lt;span class="re1"&gt;$arr&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;td align='center'&amp;gt;"&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$arr&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'date'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'weekday'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;br /&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;img src='http://icons-pe.wxug.com/i/c/a/"&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$arr&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'icon'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="st0"&gt;".gif' border=0 /&amp;gt;&amp;lt;br /&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;font color='red'&amp;gt;"&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$arr&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'high'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="re1"&gt;$tempScale&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$tempUnit&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="st0"&gt;" &amp;lt;/font&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;font color='blue'&amp;gt;"&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$arr&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="st0"&gt;'low'&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="re1"&gt;$tempScale&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="re1"&gt;$tempUnit&lt;/span&gt; &lt;span class="sy0"&gt;.&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;/font&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;/td&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="re1"&gt;$html&lt;/span&gt; &lt;span class="sy0"&gt;.=&lt;/span&gt; &lt;span class="st0"&gt;"&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;"&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class="kw3"&gt;echo&lt;/span&gt; &lt;span class="re1"&gt;$html&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2723064088198962914-3943628096836442926?l=faruq1256.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faruq1256.blogspot.com/feeds/3943628096836442926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-your-own-personalized.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3943628096836442926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2723064088198962914/posts/default/3943628096836442926'/><link rel='alternate' type='text/html' href='http://faruq1256.blogspot.com/2010/03/google-api-your-own-personalized.html' title='Google API: Your own personalized weather forecast'/><author><name>faruq shaik</name><uri>https://profiles.google.com/107945670219437010804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-KvFXQL-Y1Yg/AAAAAAAAAAI/AAAAAAAAAYU/qrv4Qzyzzr4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
