[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.
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.
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.