|
-
Aug 9th, 2000, 09:26 AM
#1
Thread Starter
Member
I want my application to log-on to an ASP page and after
having done that send some data to another ASP page.
To log-on I need to send this URL:
http://www.mtnsms.com/session.asp?na...sword=someword
And after having logged on I need to send this data
(to the newly given URL):
http://www1.mtnsms.com/sms/xsms.asp?...ge=somemessage
Now, what I don't understand is that when I do this using the Internet Explorer Address Bar; this actually works.
But when I send the exact same data using Visual Basic (winsock API):
GET http://www.mtnsms.com/session.asp?na...sword=someword
and after that:
GET http://www1.mtnsms.com/sms/xsms.asp?...ge=somemessage
It doesn't work?
I get redirected to the default page saying that the last page required me to log-on (while I do get an object moved message and a new location after having sent my first string)?
Could somebody tell me what I am doing wrong? (And how to solve it?)
Does it have something to do with cookies? Or perhaps that my socket gets disconnected after I received the first page?
Any help would be appreciated!
-
Aug 9th, 2000, 09:59 AM
#2
Fanatic Member
Its because you are requesting the second page from the first server the servers are different you have to connect to the second server then request the page
TRY
---------
winsock.remotehost = "www.mtnsms.com"
Winsock.connect
-----------
GET /session.asp?name=Login&username=somename&password=someword HTTP/1.0
HOST:www.mtnsms.com
-----------------------
winsock.close
winsock.remotehost = "www1.mtnsms.com"
Winsock.connect
-----------------------
And after having logged on I need to send this data
(to the newly given URL):
GET /sms/xsms.asp?frompage=login&name=newMsg&smsToNumbers=+0123456789&smsMessage=somemessage
HOST:www.mtnsms.com
host should be on its own line
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 10th, 2000, 05:50 AM
#3
Fanatic Member
I can't tell you exactly how it works,
but ASP keeps it session information in "cookies". This is how the server knows who is comming back so it can continue on.
what i will do (since I want to know as well) is set up a "proxy type" program that watches data flow back and forth and see what is being send to-from
I'll get back to you
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 10th, 2000, 10:24 AM
#4
Thread Starter
Member
Thank you. It would be great to access this site using a VB-program. If you could access this site with your program you would be able to let your program send you sms messages 
I'll be looking forward to see what you found out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|