This error is really starting to piss me off =(. I've created the most basic app to download a captcha from neopets then output it in a picturebox. I've gotten it to work for all images except for neopet captchas, it's puzzling me. Here is my code: Code (Text): Dim w As New RickysWrapper w.GetRequest("http://www.neopets.com/login.phtml?destination=%2Findex.phtml&username=" & textbox1.text & "&password=" & textbox2.text & "&x=53&y=12") Dim img As Bitmap = Image.FromStream(w.DownloadImage("http://www.neopets.com/captcha_show.phtml?_x_pwned=4875c3e7d97e026f58b8fa3d22cf4819")) Error is obviously on the third line. It logs in to view the captcha, then tries to get the captcha image, but for some silly reason it won't work. Help would be greatly appreciated, I've uploaded RickysWrapper to sendspace just incase you need it (neofriends.net won't let users upload any files with the extension .vb). Help would be greatly appreciated, I've tried searching google but nothing helped. I've been trying for days to figure it out, now I need your help. RICKYSWRAPPER LINK: Code (Text): http://www.sendspace.com/file/5t59a0 PS: This error is preventing me to complete my Autobuyer which I've spent so much time on :|
There's no Grabpic function in your wrapper ??? And did you validate the first line of your code (putting in a textbox to see if you're really logged in)??? I'm pretty sure you need to go throught all the page (login, hi, index) to successfully login (again, I might be wrong... but the way you're doing it got me iced already...) And again, almost all post/get command need a referer/refCheck. That how TnT check if you're cheating or not... Anyway, just my 2c
My wrapper has a grabpic function, it's called DownloadImage, but perhaps it's the function that's not working. I always fixed the login thing you were talking about, still doesn't work, and for sure I'm logged in. This is frustrating lol. Thanks for trying to help though, any more suggestions? BTW: I don't know if this could be part of the problem, but when I manually try to download the image from firefox, the default extension of the image captcha is .phtml.
it's normal... the captcha itself is contained in a frame. example: When you click a link to buy something, you end up in the haggle. Then, they call another page (let's say captcha.phtml) witch only contains a jpg image. If you do view source on the captcha, you can retrieve the link of the img.
Are you saying view the source of the captcha? Because when my program visited this link: http://www.neopets.com/captcha_show.pht ... 3d22cf4819 It stored the source in the string. The string is this: Code (Text): ���� JFIF d d �� Ducky �� Adobe d� �� � #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@�� � �" �� � !1AQaq��"��2BR��#3��bC�4 !1AQaq"�2����r�� ? �h��I43: 9 %="��PV��^/E���[Ô·*3�*$��p(��"�����1*�*� P&s:3�dS�Y�UC Q��$P���P^7{�W��74w����Ù����c��o���1�S���Õ��e��F�6iYQ�u�E�-�x�<��g �Y�}#�?�c��� Cl1�ψ�wWZ�GZ�h�2+^���%�=J�"u��u�"w5t�ju�L�ժ�w)ʴ��Ȫ��鼖G����y�K���K$���&�):I�: ���I����U+K�RSȦ@��X�:�9ʦ �Y(�n"1cjeo���&��t#��p��N�k�3�FiNő�"Ag�d�;���1�g��sarXXf����J�|���鋑G,>�Au�|���� �Í��c�V<C�?�Z�'����v��U\�*c�@���EyN�+']� �9+�9x�R�/�[��y_ ����)$nz�L�ɟ/t��x�N!���O�����q�v�J{�r>�����E�����bFS�uZ�SB���M(�Z��0�'7'�^�ڟ�p��v�pqî²»y�?AUS�}H��-D�u3ȃ��>��J�¥�^�ͧ�� ˶�ݒS���kJ����kUA���ȓӬ�-��#n�$�*ï¿½Õ Ï©ï¿½2=�.y5Jj��E�_��d�+�RÙ§ �[=�y�q�n���)������u(>[ÎŽn�m�}L�]�h�M�`�_�Y %?O�؛�N��Qf\�� KQ���얣UoB�Țπ��!Uׯ��Nj���OYr�;[w�u�z���F�v-�h�7���<��˓9�v^|a�_����s�{�!���eÏ„3` uδ�y�r��e�K�6��r4קI��J1���a:�ڜc�S��_���2�㢱stE�a���&G,Ö‡ @nEˋ��q3�� 7�(Yd��T�3�|=�5 ���&&K�ּ��&�{V!z�;*Ú«}�-g��=��*+ (@e�R\��X�h1� �/S+����`v�`�Rz��bϤ�%��k#VF��j�7Z��I������<���xI�l���(6dʌ��A��J��>�_�(�?��P`oN��ƨ�<g��Ԝ�D��&z'E����Z�M�[ڟ���?)� ��+ÇŒ"�AC�o.U�&-�l�(Pv" 1���� �(È�� ?�5���ٰ����E{nP�,T���y�yo�Æ��z��T�;�����@��Dm�É�|�~���2%{g�*�^�� �|g�q��� z�2�W��>:�+O]�3� \�36F������{<d�O��UE ��d-����R Ћ&q� �=/j�tbM���������}�����>��{I�gJ�4���'������$p� �V��A7��9'�}���< (XLÞ©z��?�b��E��<���o�}ï¿½ï¿½ç “UQ���O<�9�L�}( �$�^⿺��}?t{oF�x�;����$��a�V�T[oF���CÄŠb,k�.��)9�D@D@D@D@�LF� 0g ���W��z<l]�/�9;��ϩ�J0�H�|�kO�[V fMp���;r5)o�%RG���=�lH�N�AU��[��*��M�%�\���5V�u��\�G\ʈ,���Q^�Eݕ�Ҩ�VEeï¿½ï¿½ï¿½Ú 7^u5Ì��Ƹ� �1����Rë ¸ï¿½ï¿½P�� �� �� �� ���7��S[)P�� x����A�t䂾�>�pI?�] Y�N�-��-��ڦ���CcoZ h����|<e�q���Ý�C=�j�q6K��ÐS� _���~�C�Ӌx5"q�WԆ���1�?�A�_d\7��T�V���1]A�(:�Q>Ùºy�R��Q��o= w�:u �8�K gfn���~mO�Ɣ�p��{��W.1n�U3.�3���3z�bX����.L#n\�;W���9�HpT6�c[�͚J�`Å����ì²MÒ½v�O�P�_7�̪O$�/J�� &n�Pt�6=f��� ���� A�)Z�E��oS>>�Æz��z�;G�6�Pr'h�N v�b" " " " a�_��tB�5?9�6Oo?Q���y����2躑w��9;#A|b y����z�ŽF��,WI+3���1 H�P��$ � ����h c�:���iH��������G�3;�6�p�)�z�R�-OZrv'9��ËҼ�$��79��ge1��S����M� -�W&�M� -�Sg�p�HHAk8k+$��S�d��h[!-�7 H����Ú�|=&|�>�:�;��~��y�7�l�J�r�Xr ��F#� I'm confused lol...
take this and paste it in an empty txt file, save and rename to jpg... you'll see a wonderfull image... technicaly, you're code is working
Well lol, I tried it before and this is the error I got (when trying to open with paint): "C:\Neopets\ImageTest.jpg Paint cannot read this file This is not a valid bitmap file, or its format is not currently supported." And if I try to store to a bitmap variable I get "Parameter not valid" What should I do? (I greatly appreciate your assistance, thank you)
the problem is it's not a bitmap... here's what my function looks like Code (Text): Public Function GrabPic(ByVal strURL As String) As System.Drawing.Image Dim memStream As New MemoryStream(System.Text.Encoding.Default.GetBytes(StripHeaders(Request("GET", strURL, LastPage)))) GrabPic = Image.FromStream(memStream) Return GrabPic End Function and this goes with this Code (Text): Public Function StripHeaders(ByVal strSource As String) As String Dim strParts() As String = Regex.Split(strSource, Environment.NewLine + Environment.NewLine) Return strParts(1) End Function