Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: How to Spoof Referer URL (http://www.velocityreviews.com/forums/t59061-re-how-to-spoof-referer-url.html)

dave wanta 07-06-2003 01:54 PM

Re: How to Spoof Referer URL
 
you mean like?
(this is some old beta1 code i wrote years ago, don't know if all the
classes are still named appropriately, as I haven't used it since i wrote
it.)

Function FetchURL(SomeURL as String) as String
Dim WebResp as HTTPWebresponse
Dim HTTPGetRequest as HttpWebRequest
Dim sr As StreamReader
dim myString as String

HTTPGetRequest = WebRequestFactory.Create(SomeURL)
HTTPGetRequest.KeepAlive = false
HTTPGetRequest.Referer = "http://www.microsoft.com"
WebResp = HTTPGetRequest.GetResponse()
sr = new StreamReader(WebResp.GetResponseStream(), Encoding.ASCII)
myString = sr.ReadToEnd()

Return myString
End Function

Cheers!
Dave
www.aspNetEmail.com


"Admin" <intermension@hotmail.com> wrote in message
news:37881286.0307052133.338c97a5@posting.google.c om...
> Hi There
>
> Can someone tell me how to do this using .net??
> Thanks.
>
> Henry




Admin 07-07-2003 07:46 AM

Re: How to Spoof Referer URL
 
Yes. Precisely like that. Thank you.

"dave wanta" <nospam@nospam.com> wrote in message news:<eBAncY8QDHA.2852@tk2msftngp13.phx.gbl>...
> you mean like?
> (this is some old beta1 code i wrote years ago, don't know if all the
> classes are still named appropriately, as I haven't used it since i wrote
> it.)
>
> Function FetchURL(SomeURL as String) as String
> Dim WebResp as HTTPWebresponse
> Dim HTTPGetRequest as HttpWebRequest
> Dim sr As StreamReader
> dim myString as String
>
> HTTPGetRequest = WebRequestFactory.Create(SomeURL)
> HTTPGetRequest.KeepAlive = false
> HTTPGetRequest.Referer = "http://www.microsoft.com"
> WebResp = HTTPGetRequest.GetResponse()
> sr = new StreamReader(WebResp.GetResponseStream(), Encoding.ASCII)
> myString = sr.ReadToEnd()
>
> Return myString
> End Function
>
> Cheers!
> Dave
> www.aspNetEmail.com
>
>
> "Admin" <intermension@hotmail.com> wrote in message
> news:37881286.0307052133.338c97a5@posting.google.c om...
> > Hi There
> >
> > Can someone tell me how to do this using .net??
> > Thanks.
> >
> > Henry



All times are GMT. The time now is 04:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.