I have a VB program, in VB6 that is connecting to a website for validation of a user account. One of my users can't seem to get the thing working though.

He gave me his password and when I try it on my machine it works. The validation script on the site is in PHP, and its like server.com/validtaion.php?user=testlogin&pass=testpass and it basically returns a 1 or a 0. When he navigates to that page manually with his login/pass he gets the corrent "1" showing his account is active.

I made a debug compile of the VB app for him and the text he gets back from the server when trying in the program is

HTTP/1.1 200 OK
Date: Tue, 24 Mar 2009 14:08:29 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.8
Connection: Close
Content-Type: text/html

when i try his login/pass on my machine i get

HTTP/1.1 200 OK
Date: Tue, 24 Mar 2009 14:52:42 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.8
Transfer-Encoding: chunked
Content-Type: text/html

2
#1

I'm using a winsck to connect to the site, and here is what i'm sending

ValidationSocket.SendData "GET /validation.php?user=" & UrlEncode(txtLogin.Text) & "&pass=" & UrlEncode(txtPassword.Text) & " HTTP/1.1" & vbLf & "Host:mytestserver.net" & vbLf & vbLf

I censored the server name as mytestserver for security's sake

anyone have any ideas?

alright I edited the send data a tad to try to correct his issues, but he still has a problem, tried this:

ValidationSocket.SendData "GET http://mytestserver.net/validate.php?user=" & UrlEncode(txtLogin.Text) & "&pass=" & UrlEncode(txtPassword.Text) & " HTTP/1.1" & vbCrLf & "Host: mytestserver.net" & vbCrLf & vbCrLf

also FYI, I have another program in C++ that uses a similar method and he can succesfully log into it no problem... here is the string I send from it

sprintf(SendData,"GET /validate.php?user=%s&pass=%s HTTP/1.1\nHost:mytestserver.net\n\n", UrlEncode(login),UrlEncode(pass));

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.