using System;
using System.Data;
using System.Configuration;
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.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
using System.Net.Sockets;
 


/// <summary>
/// Summary description for sms_sent_smsgw
/// </summary>
public class sms_sent_smsgw_bill
{
    string prop;
    public sms_sent_smsgw_bill (string url)
	{
        try
        {
              //string current_date = DateTime.Now.ToString("MM/dd/yyyy");
              //string current_time = DateTime.Now.ToString("HH:mm:ss tt");
              //string mob_terminal = "56545";
           
                string send_url = url;
                Uri uri = new Uri(send_url);
                string data = "field-keywords=ASP.NET 2.0";
                if (uri.Scheme == Uri.UriSchemeHttp)
                {
                    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
                    request.Method = WebRequestMethods.Http.Post;
                    request.ContentLength = data.Length;
                    request.ContentType = "application/x-www-form-urlencoded";
                    StreamWriter writer = new StreamWriter(request.GetRequestStream());
                    writer.Write(data);
                    writer.Close();

                    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                    StreamReader reader = new StreamReader(response.GetResponseStream());
                    string tmp = reader.ReadToEnd();
                    response.Close();
                    conf_sent_sms = tmp.ToString(); 
                }
       }
        catch (Exception ex)
        {
            conf_sent_sms = "CANumber=&Respcode=1";
        }
        finally
        {
          
        }
	 
	}
    public string conf_sent_sms
    {
        get
        {
            return prop;
        }
        set
        {
            prop = value;
        }
    }
}
