Dim postData As String = "task=select" Dim tempCookies As New CookieContainer Dim encoding As New UTF8Encoding Dim byteData As Byte() = encoding.GetBytes(postData) Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("http://www.sample.com"), HttpWebRequest) postReq.Method = "POST" postReq.KeepAlive = True postReq.CookieContainer = tempCookies postReq.ContentType = "application/x-www-form-urlencoded" postReq.Referer = "http://www.sample.com" postReq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)" postReq.ContentLength = byteData.Length Dim postreqstream As Stream = postReq.GetRequestStream() postreqstream.Write(byteData, 0, byteData.Length) postreqstream.Close() Dim postresponse As HttpWebResponse postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse) tempCookies.Add(postresponse.Cookies) logincookie = tempCookies Dim postreqreader As New StreamReader(postresponse.GetResponseStream()) Dim thepage As String = postreqreader.ReadToEnd RichTextBox1.Text = thepage
<?php include("config.php"); include("sql.php"); $sql = new sql; $task = $_POST['task']; if ($task =="select") { $sql->execute_query("SELECT * FROM tbl_aisles"); } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)