Hi, i faced some errors while trying to retrieve the image from the haggle page..

Public Sub LoadImageFromUrl(ByRef url As String, ByVal pb As PictureBox)
Dim request As Net.HttpWebRequest = DirectCast(Net.HttpWebRequest.Create(url), Net.HttpWebRequest)
Dim response As Net.HttpWebResponse = DirectCast(request.GetResponse, Net.HttpWebResponse)
Dim img As Image = Image.FromStream(response.GetResponseStream())
response.Close()
pb.SizeMode = PictureBoxSizeMode.StretchImage
pb.Image = img
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

LoadImageFromUrl("http://www.neopets.com/captcha_show.phtml?_x_pwned=776fae5dc9d6b34cc133e3 759e49e573.jpg", PictureBox1)

End Sub


im statically retrieving image from the haggle page but it gave me the error "Parameter is not valid".

Error line:
Dim img As Image = Image.FromStream(response.GetResponseStream())


anyone can help??


i thought of another way.. which is storing all types of captcha image..then naming the file as the pet name.
Comparing the filename (kau.jpg) with the pet example: kau

"Enter the amount you wish to pay, <br>then click on the <strong>Kau</strong> to continue.<br>"

and proceed with haggling.. will this work??