function NWM_ResolveRedirect(url)
result = url
done = false
ut = CreateObject("roURLTransfer")
ut.SetPort(CreateObject("roMessagePort"))
while not done
ut.SetURL(result)
if ut.AsyncHead()
while true
msg = wait(10000, ut.GetPort())
if msg <> invalid
h = msg.GetResponseHeaders()
if ValidStr(h.location) <> ""
result = ValidStr(h.location)
else
done = true
end if
else
done = true
end if
exit while
end while
else
done = true
end if
end while
return result
end function
I don't have the code of the URL expander but, you can try etinyurl.com and its URL expander for expanding URLs for sure.
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!