This is regarding a post i made today regarding the class which can be found Here. A member earlier posted a request example jumping between WebClient and the http class Here. The WebClient is a wrapper for the HttpWebRequest Class and sends a request internally with less control. If we need finer control we use the class.
Please can we stop posting HttpWebRequest examples if we have never read any of the documentation. If you have read my post i clearly state i am no expert but i have written a few projects in the past for friends. I have no use for the class. It's not just about creating a request. It's knowing what to look for and also knowing HTTP. People suggest using a third party addon like Live HTTP headers but what do you think the response contains?
If the OP had read the documentation and all the sub sections HttpWebResponse.Headers Property they would no how to get the response location. MSDN does contain examples so please read them.
All we simply need to do is request the adfly link, collect the link token, SET AUTOREDIRECT to false and get the response headers. No parsing. Which no One seems to validate before parsing any way. Constant indexoutofrange exceptions.
![[Image: 70b024252420be3ed9a9ee5b35c3141b.png]](https://gyazo.com/70b024252420be3ed9a9ee5b35c3141b.png)
The full Project can be downloaded here
http://www.freefilehosting.net/adfly
http://pastebin.com/nFg6MMyN
Interesting, i am actually being helpful today :S
Please can we stop posting HttpWebRequest examples if we have never read any of the documentation. If you have read my post i clearly state i am no expert but i have written a few projects in the past for friends. I have no use for the class. It's not just about creating a request. It's knowing what to look for and also knowing HTTP. People suggest using a third party addon like Live HTTP headers but what do you think the response contains?
If the OP had read the documentation and all the sub sections HttpWebResponse.Headers Property they would no how to get the response location. MSDN does contain examples so please read them.
Code
Header Name:Connection, Value :close
Header Name:Pragma, Value :no-cache
Header Name:Content-Length, Value :0
Header Name:Cache-Control, Value :no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Header Name:Content-Type, Value :text/html
Header Name:Date, Value :Wed, 19 Dec 2012 00:35:00 GMT
Header Name:Expires, Value :Thu, 19 Nov 1981 08:52:00 GMT
Header Name:Location, Value :https://hackforums.net
Header Name:Set-Cookie, Value :PHPSESSID=47a36e39533660810cf426c5a79bdcad; path=/
Header Name:Server, Value :LiteSpeed
Header Name:X-Powered-By, Value :PHP/5.3.8All we simply need to do is request the adfly link, collect the link token, SET AUTOREDIRECT to false and get the response headers. No parsing. Which no One seems to validate before parsing any way. Constant indexoutofrange exceptions.
![[Image: 70b024252420be3ed9a9ee5b35c3141b.png]](https://gyazo.com/70b024252420be3ed9a9ee5b35c3141b.png)
The full Project can be downloaded here
http://www.freefilehosting.net/adfly
http://pastebin.com/nFg6MMyN
Interesting, i am actually being helpful today :S
