Project: Web Hosting Blog

I just started work on a new project which in reality is a web hosting blog. The content of the project will be created by the blog owner and my work includes Search engine optimization of the blog including link building and keyword analysis and optimization. Now, Search engine optimization is pretty challenging in itself and SEO can get very tricky with search engines changing their algorithms every now and then. I must agree this is my first project with respect to search engine optimization and hence this is more of an experiment rather than a project.

I am learning this new field and would post all the latest that i learn with respect to search engine optimization and keep you posted!

Cheers!

Posted in Projects | Tagged , , | Leave a comment

Send Emails using ASP.NET

Sending Emails has always been an important function of any web based application. Many web applications use emails as the basic means of communication with its users. It is used to verify a users email id; so that the user does not put someone else’s mail id instead of his or sending reminder emails, notification and much more. Hence, in this series we see sending of emails from sending the basic email to sending complete HTML pages using various programming languages. I will mainly concentrate on PHP, ASP.NET and Java.

Sending Email using ASP.NET

Sending emails in ASP.NET is very easy especially with the use of MailMessage and the SMTPClient classes. These two classes are available in the System.Net.mail namespace. The MailMessage class creates the mail message to send and it contains all the properties which can be used in a mail message like adding CC and BCC, adding headers and much more.

The SMTPClient class is used to send the email message using the send() function.  This function takes an argument of type MailMessage.

The code to send the email is as follows:

Default.aspx File: (this file merely contains HTML form which will take several fields of Email).

<div id=”EmailForm” runat=”server”>
<form runat=”server”>
<table>
<tr><td>Username</td><td>
<asp:TextBox ID=”userName” runat=”server”></asp:TextBox></td></tr>
<tr><td>Password</td><td><input type=”password” runat=”server” /></td></tr>
<tr><td>Outgoing SMTP server</td><td><asp:TextBox ID=”mailServer” runat=”server”></asp:TextBox></td><td>Port</td><td><asp:TextBox ID=”port” runat=”server” Width=”25″></asp:TextBox></td></tr>
<tr><td>To:</td><td><asp:TextBox ID=”to1″ runat=”server”></asp:TextBox></td></tr>
<tr><td>Subject</td><td>
<asp:TextBox ID=”subjectinfo” runat=”server”></asp:TextBox></td></tr>
<tr><td>Message<td><textarea id=”message” cols=”20″ rows=”2″ runat=”server”></textarea></td></tr>
<tr><td colspan=”2″  align=”center”><asp:Button ID=”Button1″ runat=”server” Text=”Send Email” /></td></tr>

</table>
</form>
<div id=”result” runat=”server”>

</div>
</div>

The default.aspx.vb file which handles the code for the click on the button.

Imports System.Net

Partial Public Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim portno As Integer
If port.Text = “” Then
portno = 25
Else
portno = port.Text
End If
Dim mailmessage As System.Net.Mail.MailMessage = New Mail.MailMessage(userName.Text, to1.Text)
Dim smtp As Mail.SmtpClient = New Mail.SmtpClient(mailServer.Text, portNo)

mailmessage.BodyEncoding = Encoding.Default
mailmessage.IsBodyHtml = False
mailmessage.Subject = subjectinfo.Text
mailmessage.Body = message.Value

Try
smtp.Send(mailmessage)
result.InnerHtml = “<b>Message sent successfully</b>”
userName.Text = “”

Catch ex As Exception
result.InnerHtml = “<b>” & ex.Message & “</b>”

End Try

End Sub
End Class

Now, to send email from a SMTP server that does not require any authentication for outgoing mails can use the above code, but to send emails from an SMTP server that requires authentication( most servers these days do due to SPAM) you can make the following changes to the web.config file.

<system.net>
<mailSettings>

<smtp from=”from@yourdomain.com”>
<network host=”mail.yourdomain.com”
userName=”user@yourdomain.com”
password=”password-here” />
</smtp>
</mailSettings>
</system.net>

You can download the entire source code here. The source code in this file is a bit different than the above code as i made a few modifications at the last minute. Do make appropriate changes to the web.config file as shown in the above. All code in this post is written using vb.net.

I will also be writing code for sending emails using PHP and Java as well as writing code for more advanced functions of Mail. So, do check back for more.

Posted in .NET, Programming | Tagged , | 8 Comments

Steganography on Images (project)


I am in the process of updating my blog with a detailed description of my projects so that people can know my programming expertise and hire me for programming jobs!

I did this project sometime back in which i was supposed to hide text into images that user uploads into the system. This text is hidden inside the image and is not displayed when seen by the naked eye. There are many sophesticated algorithm for the project, but we used a simple substitution algorithm for encoding the text into several pixels of the image.

The user who uploads the image also has to give a secret password or a passcode which is used as an encryption key to decide the position of the pixels whose values are substituted to accomodate the position the bits of text to be hidden in the image. This is a project that i did more that 3 years ago and was done in Vb 6.0 as the client had specifically requested at that time. Later on, i did convert the project into the .net platform using asp.net with vb.net.

To do this project in VB 6 was relatively difficult because of the various bit level calculations that we had to perform which is painstaking in vb 6 but using .net i could leverage the power of .net to do this project and to include several other features to this project.

The latest additions to this software was the ability to share and transfer the images with other users giving the software some social features. This software could also watermark images and have visible or invisible copyright information about the images.

Posted in Projects | Tagged , | 10 Comments

How to start a blog?

I was dumbstruck when one of my friend asked me what is a blog and I wrote this article for him and the next obvious question was:

hmm…that sounds interesting? How do I start a blog?

Now, starting a blog is the most easiest and the most challenging thing; yes challenging because you need to have content to post about in your blog and to post content you need to have ideas about blog posts; otherwise your blog would be among those thousands of dead blogs on the internet. Apart from content, what you need is a domain name like pranavbhat.info or pranavbhat.com. Along with a domain name you need to have a web hosting account with a web hosting company to host your blog.

Now, there are several domain name registrars out there who can register domains. Some of the web hosting companies also provide a free domain name with every web hosting account that you purchase. The web hosting company where i host this blog and several other websites is web hosting buzz. This company has been around for quite sometime now since 2002 and hence are really good at it.

Apart from a domain name and a web hosting account you need a good blogging software. WordPress available at wordpress.org is a popular blogging software and its free too. You can download it at WordPress.com/download

There are several other free blogging sites which offer to host your blogs for free, but i prefer that freedom which comes with having our own web hosting account and a domain and hosting our blog on it. I did write a post that describes the difference between wordpress.com and wordpress.org sometime back. WordPress.com is a free blog hosting service where as wordpress.org is a free blogging software which you can download and then install on your own.

Posted in Everything Social | Tagged , | 10 Comments

What is a blog?

The other day i was chatting with one of my friends and I told him that one thing that has really hooked me on is my personal cum professional blog at pranavbhat.info and I thought he would say let me read your blog and then give you a feedback but his reply really made me fall off my chair! His reply was what is a blog? I mean come on man this is 2008 and blogs have been around for quite a while. That is when i realized that many people still might not know what exactly a blog is? So, i thought let me try and have a blog post about what exactly a blog is and what exactly blogging means to me.

By definition a blog is a web log that contains a log of anything and everything that we intend to share over the internet. As you can see in this blog of mine i share various aspects of my life and about things i am fond of and about things i am interested in; ofcourse including programming and my part time profession of freelance programming. But, people have blogs ranging from everything and anything right from pet training to making money on the internet to just about everything.

Now, there are several aspects to a blog and if you want to do blogging professionally then you need to take care of all of these aspects. Ofcourse this list is not exhaustive and there are several other aspects that i might not be aware of because as you can see its a complex subject. Now, some of the aspects of blogs that you might be doing very often are listed below:

  1. Blog Post: Now, what exactly is a blog post. A blog post is what you are reading right now. A blog post typically contains an article about something that you feel you should write about or an update about you or anything that concerns you that you feel people should know from you.
  2. A page: A page is something that is static and is analogous to a html web page. Ofcourse a blog post is also static and doesnt change unless you change, but blog posts are generally arranged in descending order of being posted on the blog but this is not the case with a blog page. A blog page most often can be a page to which you can append information over time like my freelance projects page where i write about the projects i do.
  3. Comments: A comment is something by which you can interact with your audience which in this case are the readers of your blog. Comments in your blog are very useful and a good interaction of your readers leads to more readers and if you are monetizing your blog then more readers means more page hits which in turn means more money.
  4. Feeds: Blogs are dynamic in nature. I know blogs which easily churn out 10 articles or blog posts per day and it can be very difficult sometimes for a reader to keep track of the latest article posted on his favourite blog. Thats when feeds come into use. Feeds are usually RSS feeds but most blogs produce other types such as ATOM feeds as well long with RSS feeds. Now, RSS stands for Really Simple Syndication and can be consumed(i.e read) by various feed readers. My favourite feed reader is the Google Reader. You can start by subscribing to my blog.

Blogs are obviously much more than i have written above and it is impossible to cover what a blog is exactly in a single blog post. Hence, i will follow up with another article that will have more advanced topics about blogging.

Posted in Everything Social | Tagged , | 2 Comments

enough of the vacation

I think i need to re-organize in a big way! Now, that exams are done(almost over a month ago) i almost have the entire day to myself and I know that I am not utilizing it to its full potential. Now, i am not a productivity expert but effective time management should be an inherent quantity in everyone these days.

Thats why I have decided to rip things off the way they are going right now and organize myself and my time in a better way.

Lets hope that this new timetable that i have created goes well. Wish me luck.

Posted in Uncategorized | 1 Comment

What should we learn from Euro 2008

What can we learn from the Euro 2008? Certainly a quote which has become a trademark of Addidas comes to my mind: Impossible is Nothing! This has proved to be true especially by teams like Russia and Turkey who have earned a place in the semi-finals of the Euro 2008. It is especially commendable in the case of the Russian team because they were struggling to qualify for the tournament and now they are in the semi-finals.

So, I thought there is definitely something to be learned from these two teams which were considered as “under dogs” before the start of the tournament. Hence, I saw Russia’s yesterdays match against the Nederlands very closely and drew the following conclusions which i feel are the reasons for their success.

1.Strategy: The Russians had a very good strategy from the onset. They perfectly knew how they should react for each and every move of the Netherlands. Moreover, they had a strategy for every player and a predefined role set for each and every player of the team. I can easily co-relate this with the process of software development. For developing any software or a project a clear and lucid strategy and the concept of the software and the approach to go about it should be clear in the mind of the programmer or developer. If the project contains more than a single developer (most projects do unless it is a small scale freelance project) then this point is even more important. Each and every person involved in the project must know his roles and duties.

2.Consistency: Another thing that caught my attention in yesterdays match is the consistency with which the Russians played their game. They had a strategy and they stuck to it and the strategy in itself was good and hence they got the rewards for it. So, consistency is the key. I did realize the importance of consistency at several points of time in my life: While trying to reduce my obesity ( I lost 22 KGs in 4 months), while studying or while programming. So as far as I am concerned consistency is important. You need to follow a strategy or a process that you have defined for a project consistently over and over again.

3.Conviction: Conviction is another important thing along with consistency and strategy. Many times while studying, i had a proper strategy to study, had all the plans charted out and all the timetables made but i lacked conviction which eventually led to the failure of the study plan. Hence, making a strategy which is good is important but i think more important is the conviction and the dedication with which you follow the strategy.

These are the points that I think are responsible for the success of these under dog teams like Turkey and Russia. I think that these three points can be used anywhere we work, whatever we do and most times than not we WILL find success. Of course, these things cant be understood unless you experience it themselves like I did; it is not that I am hearing these things for the first time in my life but then it is always better when you experience it yourself!

Posted in Uncategorized | Leave a comment

wordpress.org V/S WordPress.com

Wordpress blogging open source software
I was just asked by a friend of mine whether I paid $10 on wordpress.com to have my blog redirected to my domain name pranavbhat.info or did I pay for a domain and then downloaded wordpress from WordPress.org and then purchased another $10 for website hosting? So, I thought this is a good time to write the reasons why i decided to download wordpress and decided to buy a web hosting package.

  1. Freedom to make changes as you want: With wordpress.com blog where in you get a “yourname.wordpress.com” blog you cannot make changes as you would have wished to. There are hundereds and hundreds of plug ins developed for WordPress and even more, maybe thousands of themes developed for the wordpress platform. You can use these themes the way you want on a wordpress.org blog which you cant do on wordpress.com blog( Contradict me if i am wrong here but as far as i know i am not)
  2. Have additional features that supplement your blog: Suppose your own a technology blog and you have a pretty good user base and a good user interaction. To enable more interaction with the users and to enhance your community you would need a forum or a message board. So, what if you want to have a forum software like PHPBB or SMB or even wordpress produced BBPress. You can do this on a self hosted blog i.e a wordpress.org blog but not on a wordpress.com blog.
  3. Email Accounts: Suppose you wanted to have an email address like yourname@yourblogname.com. This is easily possible when you buy a web hosting package but relative difficult when you have a wordpress.com hosted blog. Ofcourse you can do this by buying a seperate email package and then change your MX entries at your domain registrar account. But, that would be a repetitive process. You can also have the domain registrar redirect emails sent at anything@yourblogname.com to your free email address like anything@gmail.com. So, email accounts isnt really a problem but email accounts like yourname@yourblogname.com definitely adds more professionalism and creditability. Email accounts are absolutely essential when you own a business blog.
  4. Advertisements: Blogs are these days a great way to make money although it isn’t easy; but people do make money from blogs mainly in the form of advertisements and the major source of advertisements is Google Adsense. In wordpress.com hosted blog although you can promote products using affiliate links you cannot have Google Adsense on your blog. That is possible in a self hosted wordpress blog as you can see in my blog.

Having said all the above points, wordpress.com does have certain advantages above wordpress.org. Some of them are:

  1. Automatic Updates: As soon as there is a new version of the wordpress platform, the wordpress.com automatically updates itself so that you dont have to manually update it. In a self hosted wordpress blog , you will usually have to update and install the blog by yourself. However, these days most web hosting packages do provide automatic installation, updation and uninstallation from their control panel usually under the fantiasco suite.
  2. Better community features: WordPress.com usually helps in building a better community as compared to a self hosted blog but if you are social networking expert or good at it then it should not be a problem even on self hosted blogs.
  3. One username many blogs: On a wordpress.com blog you just need a single username to create as many blogs as you want. On wordpress.org you need to have a separate installation for each blog. Although this is resolved by the use of WordPress Mu which is a multi blogging system on which wordpress.com is based.

So, as you can see there are several advantages for self hosted wordpress blogs and a couple of them for wordpress.com blogs. However, for me the advantages of a self hosted wordpress blog are far greater than those of a wordpress.com blog and hence i have chosen a self hosted wordpress blog as my personal cum professional blog.

Listed below are some of the web hosting and domain registrar companies listed below to assist the readers of this post:

  1. GoDaddy.com Hosting Plans
  2. AN Web Hosting
  3. Netfirms Web Hosting: Trusted by over 1,000,000 people and growing
  4. Unlimited Domain Hosting Only $9.95 a Month
  5. ImHosted.com Web Hosting
Posted in Everything Social | Tagged , , | 11 Comments

New projects category launched!

I have also launched a new project category which will enable me to post the latest projects that i do as well as all the projects that I have done in the past. I will also post detailed information about the project including the technical information as well as code snippets wherever possible.

Thus please check out the my freelance programming projects and do contact me if you need to outsource any kind of programming.

Cheers!

Posted in Projects | Leave a comment

Another reason to comment on this blog

Now my blog is openID enabled

Now, I have give all of YOU readers, another reason to comment on my blog. My blog is now openID enabled.Many of you might be asking what the heck is this openID? How good is it for me? According to Wikipedia openId is:

OpenID is a shared identity service, which allows Internet users to log on to many different web sites using a single digital identity, eliminating the need for a different user name and password for each site. OpenID is a decentralized, free and open standard that lets users control the amount of personal information they provide.

You can read the entire article here on Wikipedia.So, what this essentially means that using an openID you can post comments in my blog using your wordpress.com, YAHOO,AOL and several more. So, now can i expect more comments from my readers ;) ?

Posted in Everything Social | Leave a comment