Results 1 to 3 of 3

Thread: [RESOLVED] HttpSendRequest, redirects ,GetFinalURL

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    441

    Resolved [RESOLVED] HttpSendRequest, redirects ,GetFinalURL

    Hi, how I can get back url when I use the, InternetOpen, InternetConnect, HttpOpenRequest, HttpSendRequest

    Suppose that the url "www.some.com/one.php" redirects to "www.some.com/two.php" as I can know that the destination url is "two.php"?

    I try HttpQueryInfo, but it seems not be the way.
    leandroascierto.com Visual Basic 6 projects

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: HttpSendRequest, redirects ,GetFinalURL

    Have you tried retrieving the Status Code (HTTP_QUERY_STATUS_CODE - 19) and then if it's a redirection status retrieving the Status Text (HTTP_QUERY_STATUS_TEXT - 20). ? I believe that the Status Text will contain the redirect URL.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    441

    Re: HttpSendRequest, redirects ,GetFinalURL

    hello, thank you, use the flag INTERNET_FLAG_NO_AUTO_REDIRECT, so if HttpQueryInfo + HTTP_QUERY_STATUS_CODE = HTTP_STATUS_REDIRECT to get the new url HttpQueryInfo + HTTP_QUERY_LOCATION and then repeat the process again

    greetings.
    leandroascierto.com Visual Basic 6 projects

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