12-30-2011، 03:41 PM
Instructions: Import System.Net and System.Text
کد:
private String GetHeaders(string url)
{
System.Net.HttpWebRequest fw = (HttpWebRequest)HttpWebRequest.Create(url/); //Connects to the url
StringBuilder sb = new StringBuilder(); //Creates a string builder
//Loops through all the headers
for (int i = 0; i < fw.GetResponse().Headers.Count; i++)
{
//Adds all the headers to the stringbuilder.
sb.AppendLine(fw.GetResponse().Headers[i].ToString());
}
return sb.ToString(); //This is how you access the hearders (e.g. Textbox.text = sb.ToString();
}
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg