Computing.Net > Forums > Programming > Winsock POST Help Visual Basic

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Winsock POST Help Visual Basic

Reply to Message Icon

Name: unityzero
Date: January 11, 2005 at 14:37:07 Pacific
OS: Windows XP
CPU/Ram: 3Ghz / 1gb RAM
Comment:

** nOTE **

& a m p ;

Should be taken without the spaces.. just cause the site reads it as HTML here

** END NOTE ***

Ive been trying to make a program to log into my website.. but i cannot get the following code to work..

Winsock1.SendData "POST /login.jsp?username=admin&password=adminspassword" & vbCrLf & vbCrLf

then i can get the HTML from the page to do what i want etc.. but i have found that winsock is sending:

& a m p ; rather than &

Which botches the login procedure.

Any ways of sending the string as i want it, rather than with the &: character.. i have tried storing the string into a Variable and sending that.. and also i have tried using the Chr(##) method.

WOndering if anyone has overcame this minor setback in any of their applications.



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: January 12, 2005 at 09:53:32 Pacific
Reply:

Technically, & amp; is actually correct... (w3.org validators complain when you do the url as login.jsp?var1=val1&var2=val2) The real question here is why that messes up the login procedure.

What I suspect is happenning, without knowing anything about C++ or WinSock, is that your data is not really getting sent via POST, since you're putting the username and password into the URL (which would make it GET).

-SN


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Winsock POST Help Visual Basic

please help visual basic www.computing.net/answers/programming/please-help-visual-basic/3769.html

Visual basics www.computing.net/answers/programming/visual-basics/17249.html

Visual Basic Help www.computing.net/answers/programming/visual-basic-help/15246.html