怎么使用PHP,获取图片跳转后的URL地址

WBOY
Release: 2016-06-13 13:25:24
Original
1165 people have browsed it

如何使用PHP,获取图片跳转后的URL地址?
我用某API接口,获取了图片的原始地址。大家有什么方法,可以模拟浏览器,获取图片跳转后的URL地址?(大家可以复制黏贴原始地址,然后查看浏览器的跳转情况)CURL? 或者别的什么方法? 谢谢。


原始地址: http://twitpic.com/show/thumb/76qpod (API获取的)
跳转后的地址: http://s1-04.twitpicproxy.com/photos/thumb/434587261.jpg (我想得到的地址)


------解决方案--------------------
怎么做到呢,Curl直接设置允许跳转就可以了,然后取得跳转后的地址.当然没有实际的测试过,只是根据以前类似的情况做出的答复。你这个地址我是打不开的

探讨

引用:

Curl可以的


怎么做到呢? 没找到这方面的实例。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!