HttpWebRequest myWebRequest=(HttpWebRequest)WebRequest.Create(url); myWebRequest.Proxy=WebRequest.GetSystemWebProxy(); HttpWebResponse myWebResponse=(HttpWebResponse)myWebRequest.GetResponse(); Stream stream=myWebResponse.GetResponseStream(); StreamReader sreader=new StreamReader(stream); StreamWriter write=new StreamWriter("/home/abulwleed/Desktop/empty.html"); write.WriteLine(sreader.ReadToEnd()); myWebResponse.Close(); write.Close(); sreader.Close();
string ipproxy="proxy.kalamoon.edu.sy";int port=3128;WebProxy proxy = new WebProxy(ipproxy,port);Uri url=new Uri("http://www.google.com/");HttpWebRequest myWebRequest=(HttpWebRequest)WebRequest.Create(url);myWebRequest.Proxy=proxy;