<?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-2396782684376889022</id><updated>2011-11-27T16:13:50.856-08:00</updated><category term='PHP'/><category term='VB.net'/><category term='Java'/><category term='Professional'/><category term='C#.net'/><title type='text'>Code Snippets</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-326708087356419433</id><published>2009-01-26T01:45:00.000-08:00</published><updated>2009-01-26T01:47:57.009-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.net'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='C#.net'/><title type='text'>A New Website with interestiing code snippets</title><content type='html'>My name is Shefeek Jinnah.I am a Software Engineer by profession.I completed my graduation from Mar Athanasious College Of Engineering,Kothamangalam,Kerala in the year 2008.Coding is my passion and technical expedition is my pursuit.&lt;br /&gt;&lt;br /&gt;    I have been writing technical blogs for the last few years.But i find myself difficult in managing all the blogs and communities.So i decided to combine all my blogs and keep it under a single roof and here it is.The intention of this website is to share information so that it will be useful for me as well as for the visitors.I will post everything technicaly that goes through my head daily and which i am involved in.&lt;br /&gt;&lt;br /&gt;I offer  free technical assistance though the discussion forum of this website.You can ask me for any technical assistance.I will provide you with enough information if it is within my range or i can get you the details soon after consulting with my senior’s&lt;br /&gt;&lt;br /&gt;http://www.shefeekj.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-326708087356419433?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/326708087356419433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=326708087356419433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/326708087356419433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/326708087356419433'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2009/01/new-website-with-interestiing-code.html' title='A New Website with interestiing code snippets'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-4365336392737883135</id><published>2008-12-04T04:40:00.000-08:00</published><updated>2008-12-04T04:57:33.339-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.net'/><title type='text'>List the names of all the computers in the network on a combobox</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_kTpBPpUFSoc/STfQHcK7xYI/AAAAAAAAAe4/j0Us161_CI8/s1600-h/ListNetworkComputers.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 307px; height: 143px;" src="http://2.bp.blogspot.com/_kTpBPpUFSoc/STfQHcK7xYI/AAAAAAAAAe4/j0Us161_CI8/s320/ListNetworkComputers.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5275914314727540098" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this simple article you will learn how you  can bring the IP address's of all the machines in a local network on to a combobox&lt;br /&gt;&lt;br /&gt;Create a C# windows application project.Insert a combobox into the form&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Net;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Insert the code below into the page load of the form&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;String strHostName = Dns.GetHostName();&lt;br /&gt;   Console.WriteLine("Host Name: " + strHostName);&lt;br /&gt;&lt;br /&gt;   // Find host by name&lt;br /&gt;   IPHostEntry iphostentry = Dns.GetHostByName(strHostName);&lt;br /&gt;&lt;br /&gt;   // Enumerate IP addresses&lt;br /&gt;   int nIP = 0;&lt;br /&gt;   foreach(IPAddress ipaddress in iphostentry.AddressList)&lt;br /&gt;   {&lt;br /&gt;    combobox1.items.add(ipaddress.ToString());&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-4365336392737883135?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/4365336392737883135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=4365336392737883135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4365336392737883135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4365336392737883135'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/list-names-of-all-computers-in-network.html' title='List the names of all the computers in the network on a combobox'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kTpBPpUFSoc/STfQHcK7xYI/AAAAAAAAAe4/j0Us161_CI8/s72-c/ListNetworkComputers.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-7972506342502601771</id><published>2008-12-03T09:12:00.001-08:00</published><updated>2008-12-03T09:15:05.870-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Uploading a file</title><content type='html'>$uploadedImage = new Upload($_FILES['uploadImage']);&lt;br /&gt; &lt;br /&gt;if ($uploadedImage-&gt;uploaded) {&lt;br /&gt; $uploadedImage-&gt;Process('myuploads');&lt;br /&gt; if ($uploadedImage-&gt;processed) {&lt;br /&gt;  echo 'file has been uploaded';&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/2396782684376889022-7972506342502601771?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/7972506342502601771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=7972506342502601771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/7972506342502601771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/7972506342502601771'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/uploading-file.html' title='Uploading a file'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-5318190045259229801</id><published>2008-12-03T09:11:00.000-08:00</published><updated>2008-12-03T09:15:33.161-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>List files in the directory</title><content type='html'>List all files in a directory and return an array.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function dirList ($directory) {&lt;br /&gt;    // create an array to hold directory list&lt;br /&gt;    $results = array();&lt;br /&gt; &lt;br /&gt;    // create a handler for the directory&lt;br /&gt;    $handler = opendir($directory);&lt;br /&gt; &lt;br /&gt;    // keep going until all files in directory have been read&lt;br /&gt;    while ($file = readdir($handler)) {&lt;br /&gt; &lt;br /&gt;        // if $file isn't this directory or its parent,&lt;br /&gt;        // add it to the results array&lt;br /&gt;        if ($file != '.' &amp;&amp; $file != '..')&lt;br /&gt;            $results[] = $file;&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    // tidy up: close the handler&lt;br /&gt;    closedir($handler);&lt;br /&gt; &lt;br /&gt;    // done!&lt;br /&gt;    return $results;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-5318190045259229801?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/5318190045259229801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=5318190045259229801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/5318190045259229801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/5318190045259229801'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/list-files-in-directory.html' title='List files in the directory'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-44231897111933009</id><published>2008-12-03T09:09:00.000-08:00</published><updated>2008-12-03T09:16:02.534-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Force Downloading a file</title><content type='html'>Forces a user to download a file, for e.g you have an image but you want the user to download it instead of displaying it in his browser.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;header("Content-type: application/octet-stream");&lt;br /&gt; &lt;br /&gt;// displays progress bar when downloading (credits to Felix ;-))&lt;br /&gt;header("Content-Length: " . filesize('myImage.jpg'));&lt;br /&gt; &lt;br /&gt;// file name of download file&lt;br /&gt;header('Content-Disposition: attachment; filename="myImage.jpg"');&lt;br /&gt; &lt;br /&gt;// reads the file on the server&lt;br /&gt;readfile('myImage.jpg');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-44231897111933009?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/44231897111933009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=44231897111933009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/44231897111933009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/44231897111933009'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/force-downloading-file.html' title='Force Downloading a file'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-938574182660692745</id><published>2008-12-03T09:07:00.000-08:00</published><updated>2008-12-03T09:16:48.968-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Random Password Generator</title><content type='html'>PHP password generator is a complete, working random password generation function for PHP. It allows the developer to customize the password: set its length and strength. Just include this function anywhere in your code and then use it.&lt;br /&gt;&lt;br /&gt;Source : http://www.webtoolkit.info/php-random-password-generator.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function generatePassword($length=9, $strength=0) {&lt;br /&gt;    $vowels = 'aeuy';&lt;br /&gt;    $consonants = 'bdghjmnpqrstvz';&lt;br /&gt;    if ($strength &amp; 1) {&lt;br /&gt;        $consonants .= 'BDGHJLMNPQRSTVWXZ';&lt;br /&gt;    }&lt;br /&gt;    if ($strength &amp; 2) {&lt;br /&gt;        $vowels .= "AEUY";&lt;br /&gt;    }&lt;br /&gt;    if ($strength &amp; 4) {&lt;br /&gt;        $consonants .= '23456789';&lt;br /&gt;    }&lt;br /&gt;    if ($strength &amp; 8) {&lt;br /&gt;        $consonants .= '@#$%';&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    $password = '';&lt;br /&gt;    $alt = time() % 2;&lt;br /&gt;    for ($i = 0; $i &lt; $length; $i++) {&lt;br /&gt;        if ($alt == 1) {&lt;br /&gt;            $password .= $consonants[(rand() % strlen($consonants))];&lt;br /&gt;            $alt = 0;&lt;br /&gt;        } else {&lt;br /&gt;            $password .= $vowels[(rand() % strlen($vowels))];&lt;br /&gt;            $alt = 1;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return $password;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-938574182660692745?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/938574182660692745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=938574182660692745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/938574182660692745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/938574182660692745'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/random-password-generator.html' title='Random Password Generator'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-4636859584752124298</id><published>2008-12-03T08:59:00.000-08:00</published><updated>2008-12-03T09:02:18.122-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Uniform Server</title><content type='html'>The Uniform Server is a WAMP package that allows you to run a server on any MS Windows OS based computer. It is small and mobile to download or move around and can also be used or setup as a production/live server. Developers also use The Uniform Server to test their applications made with either PHP, MySQL, Perl, or the Apache HTTPd Server. The main advantage is that no installation is required.You can just copy the folder to any system and set up the server in that machine.You can even carry your server in a thump drive&lt;br /&gt;&lt;br /&gt;Download Link :https://sourceforge.net/project/showfiles.php?group_id=53691&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-4636859584752124298?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/4636859584752124298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=4636859584752124298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4636859584752124298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4636859584752124298'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/uniform-server.html' title='Uniform Server'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-1144380617784805105</id><published>2008-12-03T08:48:00.000-08:00</published><updated>2008-12-03T08:56:56.654-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>WAMP  Server</title><content type='html'>WAMP server is one of the most important software that makes PHP an amazing languange.IF you want to start coding in php,you can just make your system ready for programming in minutes using WAMP server.The WAMP server is a software package which brings the following things under a single roof&lt;br /&gt;1.Apache - webserver&lt;br /&gt;2.MySql - Database&lt;br /&gt;3.PHP 5 -Compiler&lt;br /&gt;4.Php My Admin - Interactive Database Management&lt;br /&gt;&lt;br /&gt;WAMP Download Page :&lt;a href="http://www.wampserver.com/en/download.php"&gt;http://www.wampserver.com/en/download.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Double click on the downloaded file and just follow the instructions. Everything is automatic. The WampServer package is delivered whith the latest releases of Apache, MySQL and PHP.&lt;br /&gt;&lt;br /&gt;Once WampServer is installed, you can add other releases by downloading them on this website. They will then appear in the WampServer menu and you will be able to switch releases with a simple click.&lt;br /&gt;Each release of Apache, MySQL and PHP has its own settings and its own files (datas for MySQL).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Functionalities&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WampServer's functionalities are very complete and easy to use so we won't explain here how to use them.&lt;br /&gt;&lt;br /&gt;With a left click on WampServer's icon, you will be able to:&lt;br /&gt;- manage your Apache and MySQL services&lt;br /&gt;- switch online/offline (give access to everyone or only localhost)&lt;br /&gt;- install and switch Apache, MySQL and PHP releases&lt;br /&gt;- manage your servers settings&lt;br /&gt;- access your logs&lt;br /&gt;- access your settings files&lt;br /&gt;- create alias&lt;br /&gt;&lt;br /&gt;With a right click :&lt;br /&gt;- change WampServer's menu language&lt;br /&gt;- access this page&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How to start ?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you install WampServer, a "www" directory is created (generally c:\wamp\www). Create a directory inside for your project and put your PHP files in it.&lt;br /&gt;Click on the link "Localhost" in the WampServer menu or open your browser and open the http://localhost address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Add Apache, MySQL and PHP releases &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WampServer allows you to install almost all the existing releases of Apache, PHP and MySQL so you can reproduce exactly the settings of your production server.&lt;br /&gt;To add a new release, donwload it here and install it.&lt;br /&gt;&lt;br /&gt;Then click on the WampServer menu and activate the release that you want to use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Wait until the WampServer icon become white again and start to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-1144380617784805105?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/1144380617784805105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=1144380617784805105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/1144380617784805105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/1144380617784805105'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/wamp-server.html' title='WAMP  Server'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-658493947464731882</id><published>2008-12-03T07:18:00.000-08:00</published><updated>2008-12-03T07:56:53.338-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Post &amp; Get</title><content type='html'>&lt;strong&gt;Receiving variables using GET Method&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;$variablename = $_GET['formvariablename'];&lt;br /&gt;&lt;br /&gt;Note :The get method passes the variables along to the the php page from the form page  by appending them onto the end of the URL.&lt;br /&gt;For example if the form is in the page formpage.html and the php page is submit.php   .&lt;br /&gt;Inside the form tag it will be like    form action="submit.php" method="get"&lt;br /&gt;Suppose there is a textbox inside the form named txt.When we click the button,it will direct to the url   submit.php?txt="Text in the textbox"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Receiving variables using  POST  Method&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;$variablename = $_POST['formvariablename'];&lt;br /&gt;&lt;br /&gt;Note :The POST method passes the variables along to the the php page as bytes of data,not appending to the url.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-658493947464731882?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/658493947464731882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=658493947464731882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/658493947464731882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/658493947464731882'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/post-get.html' title='Post &amp; Get'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-4947498408698146089</id><published>2008-12-02T06:10:00.000-08:00</published><updated>2008-12-02T06:16:50.065-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Sending an email in PHP</title><content type='html'>Simple Mail&lt;br /&gt;&lt;?php&lt;br /&gt;$subject = "Test mail";&lt;br /&gt;$message = "Hello! This is a simple email message.";&lt;br /&gt;$from = "someonelse@example.com";&lt;br /&gt;$headers = "From: $from";&lt;br /&gt;mail($to,$subject,$message,$headers);&lt;br /&gt;echo "Mail Sent.";?&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Html Mail (You can use images and other tags in mail)&lt;br /&gt;&lt;br /&gt;// multiple recipients&lt;br /&gt;$to = 'aidan@example.com' . ', '; // note the comma&lt;br /&gt;$to .= 'wez@example.com';&lt;br /&gt;&lt;br /&gt;// subject&lt;br /&gt;$subject = 'Birthday Reminders for August';&lt;br /&gt;&lt;br /&gt;// message&lt;br /&gt;$message = 'Insert your html code here';&lt;br /&gt;&lt;br /&gt;// To send HTML mail, the Content-type header must be set&lt;br /&gt;$headers = 'MIME-Version: 1.0' . "\r\n";&lt;br /&gt;$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";&lt;br /&gt;&lt;br /&gt;// Additional headers&lt;br /&gt;$headers .= 'To: Mary , Kelly ' . "\r\n";&lt;br /&gt;$headers .= 'From: Birthday Reminder ' . "\r\n";&lt;br /&gt;$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";&lt;br /&gt;$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";&lt;br /&gt;&lt;br /&gt;// Mail it&lt;br /&gt;mail($to, $subject, $message, $headers);&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-4947498408698146089?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/4947498408698146089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=4947498408698146089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4947498408698146089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/4947498408698146089'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/sending-email-in-php.html' title='Sending an email in PHP'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-8287336712814341879</id><published>2008-12-02T05:21:00.000-08:00</published><updated>2008-12-02T05:55:12.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.net'/><title type='text'>How to send sms from pc using  gsm modem and sql server?</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;I give you an example on how you can send SMS messages to any mobile from your computer using a gsm modem.You can use your gsm mobile phone to send the sms.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;System Architecture&lt;/strong&gt; &lt;img id="BLOGGER_PHOTO_ID_5275190657488562114" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 408px; CURSOR: hand; HEIGHT: 168px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_kTpBPpUFSoc/STU99C4Qp8I/AAAAAAAAAew/SayJV9qh3LQ/s320/sms-gateway-architecture.gif" border="0" /&gt;&lt;br /&gt;It cosists of a GSM Modem, that is attached to the PC with a phone-to-PC datacable or blue tooth, an SQL-SMS Gateway software installed onto your PC, an SQL database server, such as SQL Express or MS SQL and your SMS application . As you can see on the figure, your SMS application will create an SQL record in the database. The SMS gateway will poll this record using an SQL SELECT statement and will send it using a GSM modem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Preparing your database server&lt;/strong&gt;&lt;br /&gt;To get this architecture running, first you should prepare your database. This means that you should create two database tables. One will be used for sending SMS messages (ozekimessageout) and the other will be used for receiving SMS messages (ozekimessagein). The database table you create should contain a field for sender number, recipient number and message text. For sending messages you also need a status field, that will indicate wether the message has been sent.&lt;br /&gt;&lt;br /&gt;The recommended database table layout can be seen on Figure 2. Please note that you can add extra columns to this layout freely. After creating the database table layout you should also create a username and a password that can be used to log into database.&lt;br /&gt;&lt;br /&gt;create database ozeki&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;use database ozeki&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TABLE ozekimessagein (&lt;br /&gt;id int IDENTITY (1,1),&lt;br /&gt;sender varchar(30),&lt;br /&gt;receiver varchar(30),&lt;br /&gt;msg varchar(160),&lt;br /&gt;senttime varchar(100),&lt;br /&gt;receivedtime varchar(100),&lt;br /&gt;operator varchar(30),&lt;br /&gt;msgtype varchar(30),&lt;br /&gt;reference varchar(30),&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;CREATE TABLE ozekimessageout (&lt;br /&gt;id int IDENTITY (1,1),&lt;br /&gt;sender varchar(30),&lt;br /&gt;receiver varchar(30),&lt;br /&gt;msg varchar(160),&lt;br /&gt;senttime varchar(100),&lt;br /&gt;receivedtime varchar(100),&lt;br /&gt;operator varchar(100),&lt;br /&gt;msgtype varchar(30),&lt;br /&gt;reference varchar(30),&lt;br /&gt;status varchar(30),&lt;br /&gt;errormsg varchar(250)&lt;br /&gt;);&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;sp_addLogin 'ozekiuser', 'ozekipass'&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;sp_addsrvrolemember 'ozekiuser', 'sysadmin'&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configuring the SMS Gateway&lt;br /&gt;&lt;/strong&gt;Once the database has been setup you should install and configure the SMS Gateway. The SMS Gateway we use in this article is the Ozeki NG - SMS Gateway it can be downloaded from www.ozekisms.com. There are other similar SMS gateways available. We chose this SMS Gateway, because it is very reliable, easy to configure and it is based on .NET which means it integrates well into our architecture. In the SMS gateway first you should configure the GSM modem attached to your PC. This can be done by adding a GSM Modem service provider connection. Detailed steps:&lt;br /&gt;&lt;br /&gt;Step 1.) Open http://127.0.0.1:9501 in Internet Explorer, login with admin/abc123&lt;br /&gt;&lt;br /&gt;Step 2.) In the "Serviceprovider connections" menu click on "Add service provider connection", then select "GSM Modem Connection" and click "Install"&lt;br /&gt;&lt;br /&gt;Step 3.) On the GSM modem configuration form, select the com port (usually COM1) and click on autodetect to configure your modem&lt;br /&gt;&lt;br /&gt;Step 4.) In the "Users and applications" menu click on "Add user", the select "Database user" and click on "install"&lt;br /&gt;&lt;br /&gt;Step 5.) For username provide "sql1"&lt;br /&gt;&lt;br /&gt;Step 6.) For connection string type select "OleDb" and for connection string enter:&lt;br /&gt;Provider=SQLNCLI;Server=.\SQLEXPRESS;User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True&lt;br /&gt;&lt;br /&gt;Step 7.) In the configuration form I suggest you to turn on SQL logging. You can do this by enabling the checkboxes:&lt;br /&gt;"Log SQL SELECT statements" and "Log SQL UPDATE statements".&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Writing .net Application&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;img id="BLOGGER_PHOTO_ID_5275188930931515986" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 204px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_kTpBPpUFSoc/STU8Yi8-4lI/AAAAAAAAAeo/ks20ZJjfiS8/s320/sms-gateway-form.gif" border="0" /&gt;Once the database has been perpared and the SMS Gateway has been setup you can use Visual Studio.NET to create your SMS application like in the figure above.On button click you can insert the data in the web form to the table 'ozekimessageout.'&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The sms gateway wil automatically fire the sms whenever a data is inserted into the table 'ozekimessageout'&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;private void button1_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;//Connect to the database&lt;br /&gt;OleDbConnection conn = new OleDbConnection();&lt;br /&gt;conn.ConnectionString = "Provider=SQLNCLI;Server=.\\;"+&lt;br /&gt;"User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True";&lt;br /&gt;conn.Open();&lt;br /&gt;if (conn.State == ConnectionState.Open)&lt;br /&gt;{&lt;br /&gt;//Send the message&lt;br /&gt;OleDbCommand cmd = new OleDbCommand();&lt;br /&gt;cmd.Connection = conn;&lt;br /&gt;string SQLInsert =&lt;br /&gt;"INSERT INTO "+&lt;br /&gt;"ozekimessageout (receiver,msg,status) "+&lt;br /&gt;"VALUES "+&lt;br /&gt;"('"+tbSender.Text+"','"+tbMsg.Text+"','send')";&lt;br /&gt;cmd.CommandText = SQLInsert;&lt;br /&gt;cmd.ExecuteNonQuery();&lt;br /&gt;MessageBox.Show("Message sent");&lt;br /&gt;}&lt;br /&gt;//Disconnect from the database&lt;br /&gt;conn.Close();&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.Message);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-8287336712814341879?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/8287336712814341879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=8287336712814341879' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/8287336712814341879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/8287336712814341879'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/how-to-send-sms-from-pc-using-gsm-modem.html' title='How to send sms from pc using  gsm modem and sql server?'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kTpBPpUFSoc/STU99C4Qp8I/AAAAAAAAAew/SayJV9qh3LQ/s72-c/sms-gateway-architecture.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2396782684376889022.post-7719956314523164636</id><published>2008-12-02T05:17:00.000-08:00</published><updated>2008-12-02T05:21:47.834-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Professional'/><title type='text'>Code Snippets - The programing tips</title><content type='html'>I decided to post the interesting code snippets which i goes through in my everyday life.The new blog will contain programs and other stuffs which seems interesting for me.&lt;br /&gt;The new blog address is   &lt;a href="http://codesnippetsforyou.blogspot.com/"&gt;http://codesnippetsforyou.blogspot.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2396782684376889022-7719956314523164636?l=codesnippetsforyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codesnippetsforyou.blogspot.com/feeds/7719956314523164636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2396782684376889022&amp;postID=7719956314523164636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/7719956314523164636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2396782684376889022/posts/default/7719956314523164636'/><link rel='alternate' type='text/html' href='http://codesnippetsforyou.blogspot.com/2008/12/code-snippets-programing-tips.html' title='Code Snippets - The programing tips'/><author><name>Shefeek Jinnah</name><uri>http://www.blogger.com/profile/04294605548015116023</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_kTpBPpUFSoc/SSfpVxq7zlI/AAAAAAAAAck/oGhahSKVIxw/S220/Image031.jpg'/></author><thr:total>0</thr:total></entry></feed>
