Friday, 14 December 2012

Sending dynamic email from Webmails


Code bellow shows how to send emails from asp.net c#  from web servers .

 public void SendMail()
    {

        MailMessage mm = new MailMessage("from id ", "toid");
       //(2) Assign the MailMessage's properties
         mm.Subject = "sub";
         mm.Body = "message";
         mm.IsBodyHtml =true;
        //(3) Create the SmtpClient object
        //'Dim smtp As New SmtpClient
       SmtpClient  smtp = new SmtpClient("webmail.domain");
        //'(4) Send the MailMessage (will use the Web.config settings)
       smtp.Send(mm);
     }

Send sms using API and sms gateway


It is very simple code to do this . use api http request for doing that . For this you should have enough sms credit in your account  with a registered account with sms.scibero.com.

Code

======


public string apicall(string url)  // API Push
    {
        HttpWebRequest httpreq = (HttpWebRequest)WebRequest.Create(url);

        try
        {

            HttpWebResponse httpres = (HttpWebResponse)httpreq.GetResponse();

            StreamReader sr = new StreamReader(httpres.GetResponseStream());

            string results = sr.ReadToEnd();

            sr.Close();
            return results;



        }
        catch
        {
            return "0";
        }
    }




public void SendSMS()
    {

        try
        {
           
            mobile = "to number";
            message2 = "Your sms here '";
            username = "your user name";
            password = "your pwd";
            domian = "sms.scibero.com";
            senderid = "sender";
            string result = apicall("http://" + domian + "/pushsms.php?username=" + username + "&password=" + password + "&sender=" + senderid + "&to=" + mobile + "&message=" + message2);

            if (!result.StartsWith("Wrong Username or Password"))
            {
                //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "success", "alert('Message Sent')", true);
            }
            else
            {
               // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "success", "alert('Message Sending Failed')", true);
            }

        }
        catch
        {
        }
    }

Tuesday, 11 December 2012

how to connect MSSQL or Mysql/ Connection string


Connection string means , a string of parameters that is required to establish a connection to the Remote/Local database .

This will contain  User name , Password,Server name etc

Some hosting servers , the database will be on another server , so we need to put that server name/ servers IP . Else we just put the db server as local host .

User name- is the Username created with DB

Eg :  ASP.net C# with MS SQL 2008

con.ConnectionString = "server=localhost;database=DB_MLIFE;uid=sa;pwd=admin";

Where con is the object of connection

private  SqlConnection con = new SqlConnection();

My SQL with php Connection string

mysql_connect(servername,username,password);


<?php
$con = mysql_connect("localhost","John","admin123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// some code
?>






MS Access connection in remote server

To access MS Access database is it required MS Access installed in to the remote server through php or asp.net ?

No, You can access MS access data base without MS access installed . For this you can use ODBC connection to connect to MS access instance database .And odbc drives should be available in the server .

What is unlimited hosting?


Some hosting companies are providing every thing unlimited , is it possible and is it correct , You may think like this, Actually unlimited means you can use most of the resources that are available in the server that you are hosting . And your server has a capacity and limit , and you can use resources till less or equal to that limit .Also most of the hosting companies providing this fecility like scibero.com,godady.com, etc  

Saturday, 8 December 2012

SEO will produce any positive response?


Yes, SEO is a process to convert your web pages and scripts in to an order and sequence so the search engines can list the required data to the users . Why we are doing this ? Because of that each search engines have its own algorithm to search images,data ,videos,textual matters etc , if we didn't put our website in that form it is too hard to search and find data from your website .Because a robot (Search engine spider ) is coming to look your website , and it is only a software program , so it will only catch your data according to its programmatic conditions , Remember there are many data avail be in same category on  WWW so it is very difficult to find out which is the right one . So we need to optimize our site to get listed in search engines first .

There are many process under seo .


  1. Input the following files - site maps,ror.xml files, robots.txt files, sitemap.html, rss contents etc .
  2. Arranging site contents and meta descriptions 
  3. Define all  meta properties for your website
  4. Give Alt tag for images , because there is no way to identify images from its bitmaps , so search engines need image descriptions
  5. H1 tag is necessary 
  6. Geo tag is not necessary , Google said that they are not considering geo tag because of that most of the sites are copied geo tags and it it does not contain any correct information .
  7. Submit your website in all available search engines
  8. Advertise in www , Google,bing,yahoo etc search engines are providing Ads facility ,
  9. Chose right key words, Site description should be less than 150 chars .
  10. Don't use too much key words , use separate key words

Better you should consult with a SEO specialist . Contact scibero.com for more , Increased traffic will increase your income from website .



What is SEO ?

Search Engine optimization is a process of optimizing your website to get listed in top of most of the available search engines . Such as google.com,yahoo.com,bing,alta vista etc .

For seo you can contact scibero.com .