|
-
Sep 3rd, 2011, 01:32 PM
#1
Thread Starter
Hyperactive Member
[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.
-
Sep 4th, 2011, 02:06 AM
#2
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.
-
Sep 4th, 2011, 11:05 AM
#3
Thread Starter
Hyperactive Member
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.
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
|