01.
public
void
checkblockip()
02.
{
03.
04.
int
counter = 0;
05.
String line;
07.
using
(Stream stream = req.GetResponse().GetResponseStream())
08.
{
09.
System.IO.StreamReader file =
new
System.IO.StreamReader(stream);
10.
while
((line = file.ReadLine()) !=
null
)
11.
{
12.
Console.WriteLine(line);
13.
14.
if
(focusip == line)
15.
{
16.
MessageBox.Show(
"ไม่อนุญาติให้ใช้งาน"
);
17.
18.
}
19.
else
20.
{
21.
MessageBox.Show(
"อนุญาติ เชิญค่ะ!"
);
22.
}
23.
24.
counter++;
25.
}
26.
27.
file.Close();
28.
29.
30.
Console.ReadLine();
31.
}