1

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/'
Akshay Raje
  • 852
  • 9
  • 20

1 Answers1

0

Unfortunately, other than disabling follow_location and parsing $http_response_header manually (See How to get the real URL after file_get_contents if redirection happens?) there's currently no way to get the final_url directly.

Community
  • 1
  • 1
Mars
  • 1,422
  • 8
  • 9
  • Yeah, am aware of that but that's not the most optimal approach (unlike the Python one). May be it would help to have a native PHP object mapped to urlfetch that exposes all that the API has to offer. – Akshay Raje Jul 02 '14 at 11:34
  • Feel free to add a feature request here: https://code.google.com/p/googleappengine/issues/list?q=Language%3DPHP – Mars Jul 02 '14 at 20:34