Results 1 to 4 of 4

Thread: What's the difference?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    34

    Question

    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!

  2. #2
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    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!]

  3. #3
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    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!]

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    34
    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
  •  



Click Here to Expand Forum to Full Width