[Developers_For_Ever] Question: Check webpage availability...

Wednesday, December 14, 2011

 

Hi,
I have an issue, I want to check if a certain url is valide one or not, so I used:
 HttpWebRequest  request = (HttpWebRequest)WebRequest.Create(url);//url: is the one I need to check its availability)
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//and then I returned the: response.StatusCode.ToString(), it always return found!!! although the website isn't valide.
For instance, "http://www.google.co.uk"  => Found
"http://www.googleeeee.co.uk" => Found !!!!!!!!!!!!!!!!!
Please, I need your opinions.
Thanks in advance.
Marwa Ahmad

__._,_.___
Recent Activity:
Kindly visit my Blog http://amrsaafan.blogspot.com
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment