Re: [Developers_For_Ever] Question: Check webpage availability...

Thursday, December 15, 2011

 

I think you must check the status code for the page URL, here http://en.wikipedia.org/wiki/List_of_HTTP_status_codes you can find status codes and what it means.


From: Marwa Ahmad <marwa.ahmed86@yahoo.com>
To: Egypt Pro <egyptpro@yahoogroups.com>; Group EgyptDotNetDevelopers <EgyptDotNetDevelopers@yahoogroups.com>; Group DevelopersForEver <developers_for_ever@yahoogroups.com>
Sent: Wednesday, December 14, 2011 6:41 PM
Subject: [Developers_For_Ever] Question: Check webpage availability...

 
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