Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi experts,

I'm trying to capture text from this site, but I can not.

I I can capture text from any such put, google, yahoo, ... but for this website I can not, if you test you will see that you can not.

I do not give any error, just returns me empty the string


C#
WebRequest request = WebRequest.Create("http://www.futbolaragon.com/pnfg/");

WebResponse response = request.GetResponse();

StreamReader reader = new StreamReader(response.GetResponseStream());
TextoWeb = reader.ReadToEnd();
reader.Close();


They have to have some code to reject requests for code, but if you access the web browser, I can access without problems

Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 15-Jan-13 11:55am    
Will spelling "football" help you? :-)
—SA
Jason Gleim 15-Jan-13 12:10pm    
It isn't likely there is anything to block to HTML returned by the site when you try to get it from a web client versus a browser. I suggest starting with Fiddler. Download it, follow the directions on intercepting the web request, and see what the server is returning. Right now you don't know what is wrong... if you are behind a proxy, that could be it... or there could be something else causing problems... Start with Fiddler to see the traffic and figure out if the request is even going out and actually coming back to you.
[no name] 15-Jan-13 21:51pm    
can you use web browser control?? it would be helpful for u then

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900