you can use web crawling
i.e. use HTTPWebRequest and HTTPWebResponse classes of .net
function go()
{
ccCookie = new CookieContainer();
StringBuilder sb = new StringBuilder();
string sMemberDetail = "";
string sFormDetail = "";
string sScript = "";
sParameters = "username=" + sUserId + "&password=" + Uri.EscapeDataString(sPassWd) + "&submit=Sign+In";
sResponse = fm.GetWebResponseString("http://ewebss.in/index.php", "http://eswebss.in/index.php", "POST", "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*", ccCookie, "application/x-www-form-urlencoded", sParameters);
if (sResponse.Contains("Login") && sResponse.Contains("User Name"))
{
ltrProcess.Text = "Invalid UserId or Password";
return;
}
}
public string GetWebResponseString(string Url, string Referer, string Method, string Accept, CookieContainer ccCookie, string ContentType, string PostData)
{
string strPageOutput = string.Empty;
try
{
HttpWebResponse response = GetWebResponse(Url, Referer, Method, Accept, ccCookie, ContentType, PostData, false);
strPageOutput = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
catch (Exception ex)
{
throw ex;
}
return strPageOutput;
}
public HttpWebResponse GetWebResponse(string Url, string Referer, string Method, string Accept, CookieContainer ccCookie, string ContentType, string PostData, bool microsoftajaxDelta)
{
HttpWebResponse response = null;
HttpWebRequest request = null;
try
{
request = (HttpWebRequest)WebRequest.Create(Url);
request.ServicePoint.Expect100Continue = false;
request.KeepAlive = true;
if (microsoftajaxDelta) request.Headers.Add("x-microsoftajax", "Delta=true");
if (Referer != null && Referer != "") request.Referer = Referer;
if (Method != null && Method != "") request.Method = Method;
if (Accept != null && Accept != "") request.Accept = Accept;
if (ContentType != null && ContentType != "") request.ContentType = ContentType;
if (ccCookie != null) request.CookieContainer = ccCookie;
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)";
request.Timeout = 60000;
if (PostData != null && PostData != "")
{
request.ContentLength = (long)PostData.Length;
using (Stream objStream = request.GetRequestStream())
{
byte[] arrpostData = System.Text.Encoding.ASCII.GetBytes(PostData);
objStream.Write(arrpostData, 0, arrpostData.Length);
objStream.Close();
}
}
response = (HttpWebResponse)request.GetResponse();
}
catch (Exception ex)
{
Exception exStatus = new Exception("Error Occured While Resolving Url : " + Url + Environment.NewLine + "Error Message : " + ex.Message, ex.InnerException);
throw exStatus;
}
return response;
}