This wil work ( tested )
Dim web As New System.Net.WebClient()
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim d As Byte() = {}
Dim byteData As Byte() =
web.UploadData("http://www.newzleech.com?getnzb=Get+NZB&binary%5B%5D=1115 165&",
"POST", d)
Dim oFileStream As New System.IO.FileStream("bytes.nzb",
System.IO.FileMode.Create)
oFileStream.Write(byteData, 0, byteData.Length)
oFileStream.Close()
i have tested this on my system when i double click the bytes.nzb my news
leecher start downloading 15 files of a supervideo called popeye patriotic
popeye 1957
regards
Michel
"BiT" <shirisason@walla.comschreef in bericht
news:RdKdnYrCh5G91M3bnZ2dnUVZ8tmhnZ2d@giganews.com ...
Quote:
Dim web As New System.Net.WebClient()
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
>
Dim d As Byte() =
System.Text.Encoding.ASCII.GetBytes("?getnzb=Get+N ZB&binary%5B%5D=1115165")
>
Dim res As Byte() = web.UploadData("http://www.newzleech.com/", "POST", d)
>
the odd thing is i can do it in one HTML code line and it's work perfect:
FORM action=http://www.newzleech.com/?getnzb=Get+NZB&binary%5B%5D=1115165
method=post>
<INPUT type=submit value="test" name=getnz>
>
thanks
>
"Michel Posseth [MCP]" <MSDN@posseth.comwrote in message
news:u44Lz6smHHA.1328@TK2MSFTNGP05.phx.gbl...
Quote:
Quote:
>>i've tried your code but I keep getting back 417 errors form the server
>>any idea?
>>
>>
>strange ,,,, "failed expectation" i have never encountered this error
>myself
>>
>>
>maybe you could post your code here , so we can have a look at it
>>
>>
>"BiT" <shirisason@walla.comschreef in bericht
>news:bfKdnUpGCeqkjc3bnZ2dnUVZ8seinZ2d@giganews.co m...
Quote:
>>first thanks for the answear
>>>
>>i've tried your code but I keep getting back 417 errors form the server
>>any idea?
>>>
>>"Michel Posseth [MCP]" <MSDN@posseth.comwrote in message
>>news:OOH$vagmHHA.4188@TK2MSFTNGP02.phx.gbl...
>>>>
>>>see the example i showed here
>>>>
>>>
http://groups.google.nl/group/micros...704b412827a8b8
>>>>
>>>>
>>>ofcourse in the case of a binary file you should only use the byte
>>>buffer var
>>>>
>>>be aware that this example is a true post the values are send in the
>>>message header not over the url
>>>in the case of
http://www.example.com/justaname.aspx?bla=hello&
>>>where the variabel is bla and the value is hello we talk about a Get
>>>method
>>>>
>>>regards
>>>>
>>>Michel
>>>>
>>>>
>>>"BiT" <shirisason@walla.comschreef in bericht
>>>news:K5Cdnc_QdY3UOtPbnZ2dnUVZ8t-nnZ2d@giganews.com...
>>>>Hello,
>>>>>
>>>>I'm working right now on project in vb.net 2005 for my company, i need
>>>>the project to download file from the company web site.
>>>>In order to get the file i have to give the site address
>>>>
http://www.somthing.com and then send to the server post data like
>>>>"&d=10202" to get the file.
>>>>i've search google and newsgroups but I didn't find anything to solve
>>>>my problem, I found this example
>>>>
http://dotnet.mvps.org/dotnet/code/net/#CookieRequest but i didn't
>>>>understand it.
>>>>if anyone know a document or other source code or can explain how to
>>>>do it i'll be grateful
>>>>>
>>>>Thanks
>>>>
>>>>
>>>
>>
>>
>