<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6199492886220173851</atom:id><lastBuildDate>Sun, 08 Mar 2026 08:24:25 +0000</lastBuildDate><category>WMI</category><category>VB.Net</category><category>Windows Service</category><category>ASP.Net</category><category>GridView</category><category>Ping</category><category>Process</category><title>CodeSnippts</title><description></description><link>http://codesnippts.blogspot.com/</link><managingEditor>noreply@blogger.com (Deadwin)</managingEditor><generator>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5478941818172875096</guid><pubDate>Wed, 28 Jul 2021 16:39:00 +0000</pubDate><atom:updated>2021-07-28T22:09:57.966+05:30</atom:updated><title>Creating and Parsing JSON data in PHP</title><atom:summary type="text">Following code will parse the JSON data into PHP arrays.


$json_string=&#39;{&quot;id&quot;:1,&quot;name&quot;:&quot;rolf&quot;,&quot;country&quot;:&quot;russia&quot;,&quot;office&quot;:[&quot;google&quot;,&quot;oracle&quot;]} &#39;;
$obj=json_decode($json_string);
echo $obj-&gt;name; //displays rolf
echo $obj-&gt;office[0]; //displays google


</atom:summary><link>http://codesnippts.blogspot.com/2021/07/creating-and-parsing-json-data-in-php.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-7168373761242478250</guid><pubDate>Wed, 28 Jul 2021 16:36:00 +0000</pubDate><atom:updated>2021-07-28T22:06:58.720+05:30</atom:updated><title>Email validation snippet in PHP</title><atom:summary type="text">How to validate Emails in PHP


$email = $_POST[&#39;email&#39;];
if(preg_match(&quot;~([a-zA-Z0-9!#$%&amp;amp;&#39;*+-/=?^_`{|}~])@([a-zA-Z0-9-]).([a-zA-Z0-9]{2,4})~&quot;,$email)) {
	echo &#39;This is a valid email.&#39;;
} else{
	echo &#39;This is an invalid email.&#39;;
} 


</atom:summary><link>http://codesnippts.blogspot.com/2021/07/email-validation-snippet-in-php.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-7916202743446815683</guid><pubDate>Tue, 27 Jul 2021 18:02:00 +0000</pubDate><atom:updated>2021-07-27T23:33:51.879+05:30</atom:updated><title>Get Remote IP Address in PHP</title><atom:summary type="text">How to Get Remote IP Address using Core PHP


 You can use following function to Get Remote IP Address 



function getRemoteIPAddress() {
	$ip = $_SERVER[&#39;REMOTE_ADDR&#39;];
	return $ip;
} 



 The above code will not work in case your client is behind proxy server. In that case use below function to get real IP address of client.


function getRealIPAddr()
{
	if (!empty($_SERVER[&#39;HTTP_CLIENT_IP&#39;]))</atom:summary><link>http://codesnippts.blogspot.com/2021/07/get-remote-ip-address-in-php.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5893425978217132125</guid><pubDate>Tue, 27 Jul 2021 17:53:00 +0000</pubDate><atom:updated>2021-07-27T23:23:38.449+05:30</atom:updated><title>How To Add Syntax Highlighter For Blogger</title><atom:summary type="text">Adding syntax highlighter to your Blogger will make more beautiful and specific code with formatting to look at. You can use this method to highlight for HTML, CSS, JavaScript, PHP, Python, C, C++, JAVA, PERL, XML, XHTML and much other typical codes by using&amp;nbsp;code-prettify. Why you will choose code-prettify:1. code-prettify is built by&amp;nbsp;Google.2. It is fully responsive.3. Easy to use.4. </atom:summary><link>http://codesnippts.blogspot.com/2021/07/how-to-add-syntax-highlighter-for.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-6795801919846202958</guid><pubDate>Tue, 27 Jul 2021 17:49:00 +0000</pubDate><atom:updated>2021-07-27T23:19:56.585+05:30</atom:updated><title>Base64 Encode and Decode String in PHP</title><atom:summary type="text">How to Encode and Decode String in PHP using Base64 Algorithm


 You can use following function to Encode and Decode String in PHP 



function base64url_encode($plainText) {
	$base64 = base64_encode($plainText);
	$base64url = strtr($base64, &#39;+/=&#39;, &#39;-_,&#39;);
	return $base64url;
}

function base64url_decode($plainText) {
	$base64url = strtr($plainText, &#39;-_,&#39;, &#39;+/=&#39;);
	$base64 = base64_decode($</atom:summary><link>http://codesnippts.blogspot.com/2021/07/base64-encode-and-decode-string-in-php.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5186148189633264547</guid><pubDate>Tue, 27 Jul 2021 17:08:00 +0000</pubDate><atom:updated>2021-07-27T23:21:29.137+05:30</atom:updated><title>Send Mail using mail function in PHP</title><atom:summary type="text"> How to Send Mail using mail function in PHP 


$to = &quot;reciever@gmail.com&quot;;
$subject = &quot;Test Message&quot;;
$body = &quot;Body of your message here you can use HTML too&quot;;
$headers = &quot;From: Your Name\r\n&quot;;
$headers .= &quot;Reply-To: info@yoursite.com\r\n&quot;;
$headers .= &quot;Return-Path: info@yoursite.com\r\n&quot;;
$headers .= &quot;X-Mailer: PHP5\n&quot;;
$headers .= &#39;MIME-Version: 1.0&#39; . &quot;\n&quot;;
$headers .= &#39;Content-type: text/</atom:summary><link>http://codesnippts.blogspot.com/2021/07/php-snippets-send-mail-using-mail.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-7413261291212712583</guid><pubDate>Sat, 31 Jul 2010 11:45:00 +0000</pubDate><atom:updated>2010-07-31T17:17:21.821+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VB.Net</category><title>How to Hide File using VB.Net</title><atom:summary type="text">Private Sub HideFile(ByVal strFilePath As String)

 Try
    Dim strFInfo As New FileInfo(strFilePath)
    strFInfo.Attributes = FileAttributes.Hidden
    MessageBox.Show(&quot;Successfully Applied.&quot;)
 Catch ex As Exception
    MessageBox.Show(ex.Message)
 End Try

End Sub
</atom:summary><link>http://codesnippts.blogspot.com/2010/07/how-to-hide-file-using-vbnet.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-8288841406025162314</guid><pubDate>Sat, 31 Jul 2010 10:06:00 +0000</pubDate><atom:updated>2010-07-31T15:57:59.930+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VB.Net</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Get Free Disk Space on Server</title><atom:summary type="text">We can determine Free Disk Space on Server using WMI provider. In this article we will use GetFreeDiskSpace Function which is written in VB.Net and you can use it in your project.

Function Parameter
Target Computer Name
Admin Credential(Username/Password)
Here we used Win32_LogicalDisk Class for querying Hard-Disk information.

Hard-Disk Information which we will gather is given below:
Drive </atom:summary><link>http://codesnippts.blogspot.com/2010/07/get-free-disk-space-on-server.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-3128390364931827429</guid><pubDate>Fri, 23 Jul 2010 09:41:00 +0000</pubDate><atom:updated>2010-07-23T15:17:34.820+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">VB.Net</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>List all Installed Software on Remote Machine</title><atom:summary type="text">In this article you will learn how to List all Installed Software on Local/Remote Machine. 

Installed Software Information which we will gather are listed below:
Caption: Name of Software
Description: Description of the product
IdentifyingNumber: Product identification such as a serial number on software
InstallDate: Date that this product is installed on the system.
InstallLocation: Location of</atom:summary><link>http://codesnippts.blogspot.com/2010/07/list-all-installed-software-on-remote.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-8073306370036176535</guid><pubDate>Sat, 10 Jul 2010 11:49:00 +0000</pubDate><atom:updated>2010-07-13T01:27:28.824+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Service</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Resume Service on Remote Machine</title><atom:summary type="text">What is Windows Service
Windows Service is a background process that performs certain task. We can perform various methods on service like start,stop,pause or resume on local or remote machine.
In this article you will perform resume methods on service using VB.Net. Here you can use &quot;ResumeService&quot; Function which is given below. Using this function you can perform this action on local or remote </atom:summary><link>http://codesnippts.blogspot.com/2010/07/resume-service-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5447889125311258517</guid><pubDate>Sat, 10 Jul 2010 11:47:00 +0000</pubDate><atom:updated>2010-07-15T00:56:32.175+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Service</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Pause Service on Remote Machine</title><atom:summary type="text">What is Windows Service

Windows Service is a background process that performs certain task. We can perform various methods on service like start,stop,pause or resume on local or remote machine.
In this article you will perform pause methods on windows service using VB.Net. Here you can use &quot;PauseService&quot; Function which is given below, here you will pass two parameters one is Computer Name and </atom:summary><link>http://codesnippts.blogspot.com/2010/07/pause-service-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5927162734148700774</guid><pubDate>Sat, 10 Jul 2010 11:25:00 +0000</pubDate><atom:updated>2010-07-15T01:16:07.783+05:30</atom:updated><title>Stop Winodws Service on Remote Machine</title><atom:summary type="text">What is Windows Service

Windows Service is a background process that performs certain task. We can perform various methods on service like start,stop,pause or resume on local or remote machine.
In this article you will perform Stop methods on windows service using VB.Net. Here you can use &quot;StopService&quot; Function which is given below. Using this function you can perform this action on local or </atom:summary><link>http://codesnippts.blogspot.com/2010/07/stop-service-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-8451128687608330675</guid><pubDate>Sat, 10 Jul 2010 11:23:00 +0000</pubDate><atom:updated>2010-07-12T21:46:11.518+05:30</atom:updated><title>Start Service on Remote Machine</title><atom:summary type="text">What is Windows Service

Windows Service is a background process that performs certain task. We can perform various methods on service like start,stop,pause or resume on local or remote machine.

In this article you will perform resume methods on service using VB.Net. Here you can use &quot;ResumeService&quot; Function which is given below. Using this function you can perform this action on local or remote</atom:summary><link>http://codesnippts.blogspot.com/2010/07/private-sub-startservicebyval.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-6314218369482275033</guid><pubDate>Sat, 10 Jul 2010 11:18:00 +0000</pubDate><atom:updated>2010-07-10T16:48:58.827+05:30</atom:updated><title>Create Service on Remote Machine</title><atom:summary type="text">
Private Sub CrateService(ByVal strComputer As String)

        Dim objWMIService, colServiceList, objService, errReturn, objSWbemLocator
        Const OWN_PROCESS = 16
        Const NOT_INTERACTIVE = False
        Const NORMAL_ERROR_CONTROL = 2
        Dim strName, strDisplay, strPath As String

        strName = txtName.Text
        strDisplay = txtDisplay.Text
        strPath = txtPath.Text

</atom:summary><link>http://codesnippts.blogspot.com/2010/07/create-service-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-5839017773484661938</guid><pubDate>Sat, 10 Jul 2010 11:05:00 +0000</pubDate><atom:updated>2010-07-12T21:52:36.786+05:30</atom:updated><title>Change IE Proxy on Remote Machine</title><atom:summary type="text">Private Sub ChangeProxy(ByVal IP As String, ByVal Proxy As Boolean, ByVal strAddress As String, ByVal ByPass As Boolean)

        Dim strComputer
        Dim strUserName
        Dim strPassword
        Dim objLocator
        Dim objService
        Dim objRegistry

        Dim strKeyPath, strValueName, strValue As String
        Dim dwValue As Integer

        Const HKEY_CURRENT_USER = &amp;amp;</atom:summary><link>http://codesnippts.blogspot.com/2010/07/change-ie-proxy-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-452870705793035834</guid><pubDate>Sat, 10 Jul 2010 10:56:00 +0000</pubDate><atom:updated>2010-07-10T16:26:27.860+05:30</atom:updated><title>Kill Process on Remote Machine</title><atom:summary type="text">
Private Sub ProcessKill(ByVal strIP As String, ByVal PID As Integer)

        Dim query As Management.ManagementObjectSearcher
        Dim queryCollection As Management.ManagementObjectCollection
        Dim management_object1 As Management.ManagementObject
        Dim msc As Management.ManagementScope

        Dim co As New Management.ConnectionOptions
        co.Username = UserName
        </atom:summary><link>http://codesnippts.blogspot.com/2010/07/kill-process-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-4319454239141106275</guid><pubDate>Sat, 10 Jul 2010 10:48:00 +0000</pubDate><atom:updated>2010-07-15T21:22:00.722+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Process</category><category domain="http://www.blogger.com/atom/ns#">VB.Net</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Start Process on Remote Machine in VB.Net</title><atom:summary type="text">In this article we will use WMI Provider for Start a &quot;Process on Remote Machine&quot;. You can use CreateProcess procedure, this procedure has verious parameters:
Computer Name
Process Name
UserName
Password
Private Sub CreateProcess(ByVal strComputer As String, ByVal strProcess As String,ByVal UserName As String,ByVal Password As String)

        Dim processBatch As ManagementClass = New </atom:summary><link>http://codesnippts.blogspot.com/2010/07/start-process-on-remote-machine.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-2208214643867295905</guid><pubDate>Wed, 07 Jul 2010 20:37:00 +0000</pubDate><atom:updated>2010-07-15T01:11:29.808+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ping</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Ping Network Computer in VB.Net</title><atom:summary type="text">&quot;Ping&quot; is very basic utility for every network programmer. Here we will discuss ping a computer in Network using VB.Net.

We have two methods for pinging a computer.

Method 1: Here we will use VB.Net NetworkInformation NameSpace.
Public Sub PingStatus(ByVal strComputer As String)

        Dim pingSender As Ping = New Ping()
        Dim options As PingOptions = New PingOptions()

        </atom:summary><link>http://codesnippts.blogspot.com/2010/07/blog-post.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-717531162139018991</guid><pubDate>Mon, 05 Jul 2010 12:33:00 +0000</pubDate><atom:updated>2010-07-08T01:44:20.921+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>Free Disk Space on Remote Computer</title><atom:summary type="text">Public Sub GetFreeDiskSpace(ByVal strComputer As String, ByVal strUserName As String, ByVal strPwd As String)

        Dim query As Management.ManagementObjectSearcher
        Dim queryCollection As Management.ManagementObjectCollection
        Dim management_object1 As Management.ManagementObject
        Dim msc As Management.ManagementScope

        If (strComputer = </atom:summary><link>http://codesnippts.blogspot.com/2010/07/public-sub-getfreediskspacebyval.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-540842362963577189</guid><pubDate>Mon, 05 Jul 2010 11:59:00 +0000</pubDate><atom:updated>2010-07-06T13:36:17.253+05:30</atom:updated><title>Get Installed Printer on Netwrok</title><atom:summary type="text">
Public Sub NetworkInstalledPrinter(ByVal strComputer As String, ByVal strUserName As String, ByVal strPwd As String)

        Try
            Dim Query As Management.ObjectQuery = New System.Management.ObjectQuery(&quot;SELECT * FROM Win32_Printer&quot;)
            Dim moSearcher As Management.ManagementObjectSearcher = New System.Management.ManagementObjectSearcher(Query)
            Dim moc As </atom:summary><link>http://codesnippts.blogspot.com/2010/07/public-sub-networkinstalledprinterbyval.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-9207879218978501514</guid><pubDate>Mon, 05 Jul 2010 11:59:00 +0000</pubDate><atom:updated>2010-07-06T13:38:06.928+05:30</atom:updated><title>Get Installed Printer List on Remote Machine</title><atom:summary type="text">
Public Sub RemoteInstalledPrinter(ByVal strComputer As String, ByVal strUserName As String, ByVal strPwd As String)

        Dim query As Management.ManagementObjectSearcher
        Dim queryCollection As Management.ManagementObjectCollection
        Dim management_object1 As Management.ManagementObject
        Dim msc As Management.ManagementScope

        If (strComputer = </atom:summary><link>http://codesnippts.blogspot.com/2010/07/public-sub-remoteinstalledprinterbyval.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-7591254921737032115</guid><pubDate>Mon, 05 Jul 2010 10:17:00 +0000</pubDate><atom:updated>2010-07-06T13:40:32.753+05:30</atom:updated><title>Installed Software List on Remote Machine using Registry</title><atom:summary type="text">
Public Sub SoftwareInformationRegistry(ByVal strComputer As String, ByVal strUserName As String, ByVal strPwd As String)

        Dim objLocator, objService, objRegistry, arrIdentityCode, strIdentityCode, objShell
        Dim objFSO, objTextFile
        Dim strRegIdentityCodes As String

        objLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)


        Try

            If (strComputer = </atom:summary><link>http://codesnippts.blogspot.com/2010/07/public-sub-softwareinformationregistryb.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-4636940085490138747</guid><pubDate>Mon, 05 Jul 2010 09:56:00 +0000</pubDate><atom:updated>2010-07-06T13:42:22.480+05:30</atom:updated><title>Installed Software List on Remote Machine using WMI</title><atom:summary type="text">
Public Sub SoftwareInformationVBS(ByVal strComputer As String, ByVal strUserName As String, ByVal strPwd As String)

        Dim objWMIService, objFSO, objTextFile, colSoftware, objSoftware, objSWbemLocator

        Try

            objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            objTextFile = objFSO.CreateTextFile(&quot;c:\software.txt&quot;, True)

            objSWbemLocator = </atom:summary><link>http://codesnippts.blogspot.com/2010/07/public-sub-softwareinformationvbsbyval.html</link><author>noreply@blogger.com (Deadwin)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6199492886220173851.post-4746686546947106412</guid><pubDate>Sat, 06 Feb 2010 09:37:00 +0000</pubDate><atom:updated>2010-07-15T12:54:38.605+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><category domain="http://www.blogger.com/atom/ns#">GridView</category><title>GridView Paging and Sorting</title><atom:summary type="text">Introduction 

Paging and Sorting are most commonly used features of ASP.Net GridView. And it is very easy to implement in GridView with small lines of code. Here I am going to demonstrate how to use Paging and Sorting in GridView for better use of data display.
Steps for Paging and Sorting

We will perform following steps to enable paging and sorting into our GridView
Set AllowPaging=&quot;True&quot; and </atom:summary><link>http://codesnippts.blogspot.com/2010/02/introduction-paging-and-sorting-are.html</link><author>noreply@blogger.com (Deadwin)</author></item></channel></rss>