How to get the redirected URL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ming

    How to get the redirected URL?

    Hi there,

    I have a bunch of URLs. They are all redirecting URLs: if you visit
    any one of them, you will be redirected to another URL.

    I want to know the redirected URL. How shall I do that? I think I
    shall probably send a http request and capture its response and then
    parse the response to get its real destination, don't I?

    But how shall I implement it? Any sample code?

    Thanks,

    Ming

  • Ming

    #2
    Re: How to get the redirected URL?

    Never mind, I got it worked.

    On Jun 21, 10:50 pm, Ming <minghu...@gmai l.comwrote:
    Hi there,
    >
    I have a bunch of URLs. They are all redirecting URLs: if you visit
    any one of them, you will be redirected to another URL.
    >
    I want to know the redirected URL. How shall I do that? I think I
    shall probably send a http request and capture its response and then
    parse the response to get its real destination, don't I?
    >
    But how shall I implement it? Any sample code?
    >
    Thanks,
    >
    Ming

    Comment

    Working...