Like the Python URL Fetch API, isn't there any way of getting the final_url in PHP on Google App Engine. Here's how its accessed in Python :
>>> from google.appengine.api import urlfetch
>>> urlfetch.fetch('http://google.com/').final_url
'http://www.google.com/'
不幸的是,除了手动禁用follow_location并解析$ http_response_header(请参阅如何在file_get_contents之后获取真实URL,如果发生重定向? )之外,目前尚无法直接获取final_url。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.