Thursday, 28 February 2013

Lesson 3

When you start thinking of doing a business through internet, first thing which you think about is your web site domain name. Before you choose a domain name you should consider the followings:
  • Who would be your target audience?
  • What you intend to sell to them. Is it a tangible item or just text content?
  • What will make your business idea unique or different than everything else that is already on the market?
Many people think it is important to have keywords in a domain. Keywords in the domain name are usually important, but it usually can be done while keeping the domain name short, memorable, and free of hyphens.
Using keywords in your domain name give you a strong competitive advantage over your competitors. Having your keywords in your domain name can increase click through rates on search engine listings and paid ads as well as make it easier to Using your keywords in get keyword rich descriptive inbound links.
Avoid buying long, and confusing domain names. May people separate the words in their domain names using either dashes or hyphen. In the past the domain name itself was a significant ranking factor but now search engines have advanced it is not very significant factor anymore.
Keep two to three words in your domain name it will be more memorable. Some of the most memorable websites do a great job of branding by creating their own word. Few examples are eBay, Yahoo!, Expedia, Slashdot, Fark, Wikipedia, Google...
You should be able to say it over the telephone once and the other person should know how to spell it and they should be able to guess about what you sell.

Key Points:

Finally, you should be able to answer yourself for the following questions:
  • Why do you want to build your website? Why should people buy off your site and not from other Site? What makes you different from others?
  • Who are your target audience and what you intend to sell to them?
  • List 5 - 10 websites which you thing, they are they amazing. Now think why are they amazing?
  • Create 5 different domain names. Make at least 1 of them funny. Tell them to a half dozen people and see which ones are the most memorable. You will get more honest feedback if the people do not know you well.
  • Buy your domain name which is more catchy, memorable and relevant to your business.

Lesson 2


SEO techniques are classified into two broad categories:
  1. Techniques that search engines recommend as part of good design referred to as White Hat SEO, and
  2. Techniques that search engines do not approve and attempt to minimize the effect of referred to as Black Hat or spamdexing.
White Hat SEO:
An SEO tactic, technique or method is considered as White Hat if it follows the followings
  • If it conforms to the search engine's guidelines.
  • If it does not involves any deception.
  • It ensures that the content a search engine indexes and subsequently ranks is the same content a user will see.
  • It ensures that a Web Page content should have been created for the users and not just for the search engines.
  • It ensures the good quality of the web pages
  • It ensures the useful content available on the web pages
Always follow a White Hat SEO tactic and don't try to fool your site visitors. Be honest and definitely you will get something more.
Next chapter onward we will put light on White Hap SEO techniques. The WHST are very simple and can be done without investing much cost.
Black Hat or Spamdexing:
An SEO tactic, technique or method is considered as Black Hat or Spamdexing if it follows the followings
  • Try to improve rankings that are disapproved of by the search engines and/or involve deception.
  • Redirecting users from a page that is built for search engines to one that is more human friendly.
  • Redirecting users to a page that was different from the page the search engine ranked.
  • Serving one version of a page to search engine spiders/bots and another version to human visitors. This is called Cloaking SEO tactic.
  • Using Hidden or invisible text or with the page background color, using a tiny font size or hiding them within the HTML code such as "no frame" sections.
  • Repeating keywords in the Meta tags, and using keywords that are unrelated to the site's content. This is called Meta tag stuffing.
  • Calculated placement of keywords within a page to raise the keyword count, variety, and density of the page. This is called Keyword stuffing .
  • Creating low-quality web pages that contain very little content but are instead stuffed with very similar key words and phrases. These pages are called Doorway or Gateway Pages
  • Mirror web sites by hosting multiple web sites all with conceptually similar content but using different URLs.
  • Creating a rogue copy of a popular web site which shows contents similar to the original to a web crawler, but redirects web surfers to unrelated or malicious web sites. This is called Page hijacking.
Always be away to adopt any of the above Black Hat tactic to improve the rank of your site. Search engines are smart enough to identify all the above proprieties of your site and ultimately you are not going to get anything.

Sending SMS from the webpage

Introduction

In this article we will see an example of sending sms through the way2sms account. There are two pages in the demo

1. login.aspx 
2. Sms.aspx

This is the login.aspx where you have to provide your way2sms username and password

NOTE: If you don't have account in way2sms, before using this demo you have to create account in way2sms.com

1.gif

protected
void btnconnect_Click(object sender, EventArgs e){    Session["id"] = txtmobileno.Text;    Session["pw"] = txtpw.Text;    Response.Redirect("send.aspx");}
Send.aspx

In this page two functions are created

1. Connect() this function will connect and authenticate your id and password
2. Sendsms(): If you are successfully connected they you will get the following page and you can send sms now


2.gif
Send.aspx.cs

using
System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;using System.Net;using System.Text;using System.Text.RegularExpressions;
public
partial class send : System.Web.UI.Page{    string mbno, mseg, ckuser, ckpass;    private HttpWebRequest req;    private CookieContainer cookieCntr;    private string strNewValue;    public static string responseee;    private HttpWebResponse response; 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["id"] == null && Session["pw"] == null)
        {
            Server.Transfer("login.aspx");
        }
        connect();
 
        try
        {
            lblError.Text = "";
            lblError.Visible = false;
            if (!(IsPostBack))
            {
                btnSend.Attributes.Add("onclick", "return Validate('" + txtTo.ClientID + "','" + txtMessage.ClientID + "');");
                txtMessage.Attributes.Add("onchange", "TextChange('" + txtMessage.ClientID + "','" + lblLeft.ClientID + "');");
                txtMessage.Attributes.Add("onkeyup", "TextChange('" + txtMessage.ClientID + "','" + lblLeft.ClientID + "');");
            }
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message;
            lblError.Visible = true;
        }
       
    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        try
        {
            mbno = txtTo.Text;
            mseg = txtMessage.Text;
 
            sendSms(mbno, mseg);
            txtTo.Text = "";
            txtMessage.Text = "";
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message;
            lblError.Visible = true;
        }
    }
    public void connect()
    {
        ckuser = Session["id"].ToString();
        ckpass = Session["pw"].ToString();
 
        try
        {
            this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com/auth.cl");
 
            this.req.CookieContainer = new CookieContainer();
            this.req.AllowAutoRedirect = false;
            this.req.Method = "POST";
            this.req.ContentType = "application/x-www-form-urlencoded";
            this.strNewValue = "username=" + ckuser + "&password=" + ckpass;
            this.req.ContentLength = this.strNewValue.Length;
            StreamWriter writer = new StreamWriter(this.req.GetRequestStream(), Encoding.ASCII);
            writer.Write(this.strNewValue);
            writer.Close();
            this.response = (HttpWebResponse)this.req.GetResponse();
            this.cookieCntr = this.req.CookieContainer;
            this.response.Close();
            this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com//jsp/InstantSMS.jsp?val=0");
            this.req.CookieContainer = this.cookieCntr;
            this.req.Method = "GET";
            this.response = (HttpWebResponse)this.req.GetResponse();
            responseee = new StreamReader(this.response.GetResponseStream()).ReadToEnd();
            int index = Regex.Match(responseee, "custf").Index;
            responseee = responseee.Substring(index, 0x12);
            responseee = responseee.Replace("\"", "").Replace(">", "").Trim();
            this.response.Close();
 
            pnlsend.Visible = true;
            lblErrormsg.Text = "connected";
        }
        catch (Exception)
        {
            lblErrormsg.Text = "Error connecting to the server...";
            Session["error"] = "Error connecting to the server...";
            Server.Transfer("login.aspx"); 
        }
    }
    public void sendSms(string mbno, string mseg)
    {
        if ((mbno != "") && (mseg != ""))
        {
            try
            {
                this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com//FirstServletsms?custid=");
                this.req.AllowAutoRedirect = false;
                this.req.CookieContainer = this.cookieCntr;
                this.req.Method = "POST";
                this.req.ContentType = "application/x-www-form-urlencoded";
                this.strNewValue = "custid=undefined&HiddenAction=instantsms&Action=" + responseee + "&login=&pass=&MobNo=" + this.mbno + "&textArea=" + this.mseg;
 
                string msg = this.mseg;
                string mbeno = this.mbno;
 
                this.req.ContentLength = this.strNewValue.Length;
                StreamWriter writer = new StreamWriter(this.req.GetRequestStream(), Encoding.ASCII);
                writer.Write(this.strNewValue);
                writer.Close();
                this.response = (HttpWebResponse)this.req.GetResponse(); 
                this.response.Close();
                lblErrormsg.Text = "Message Sent..... " + mbeno + ": " + msg;
            }
            catch (Exception)
            {
                lblErrormsg.Text = "Error Sending msg....check your connection...";
            }
        }
        else
        {
            lblErrormsg.Text = "Mob no or msg missing";
        }
    }
 
    protected void logout_Click(object sender, EventArgs e)
    {
        //logout
        Session["id"] = null;
        Session["pw"] = null;
        Session["error"] = null;
        Server.Transfer("login.aspx");
    }
}