Results 1 to 5 of 5

Thread: How to get text after "?"

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    you know how when you post some details,

    it posts to address:

    http://www.hello.com/cgi.cgi?user=hello&pass=hello

    how can i retrieve everything after "?"
    inside an activex document??

    please help someone??

    i thought it might be command$ ??



  2. #2
    Lively Member
    Join Date
    Jun 1999
    Posts
    120

    Parsing strings

    See the tip
    "Parse out a section from a delimited string"
    (http://www.vbsquare.com/tips/tip391.html)
    it does not directly answers your problem
    but it's related...

  3. #3
    Lively Member
    Join Date
    Jun 1999
    Posts
    120
    I experimented and I came out with the following:

    Code:
    Function fxnGetString(sAddr) as string
    Dim varLen as integer
    
       for varLen = Len(sAddr) To 1 Step -1
         if Instr("?", MID$(sAddr,varLen,1)) then exit for
       next varLen
    
       fxnGetString = right$(sAddr, len(sAddr) - varLen)
    
    End Function
    hope this works...
    feel free to adopt...

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You can simply do something like this:

    Code:
    Dim strText As String
    
    strText = "http://www.hello.com/cgi.cgi?user=hello&pass=hello"
    
    strText = Mid(strText, InStr(strText, "?") + 1)
    MsgBox strText
    That's it.

  5. #5

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    thanks,for all that input,

    but think of cgi.cgi as a visual basic document
    i would like to know, how to get the details, that have been posted to the vbd file

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