I am trying to get the size of Facebook user's profile pictures by using the following code:
getimagesize('http://graph.facebook.com/XXXXXXXXXXXX/picture?type=large')
where XXXXXXXXXXXXXX is the Face开发者_运维问答book's user ID.
When I tested the code on my local machine, I could get the image size back. However, when I tested on remote server with www.domain.com, the (http://graph.facebook.com/XXXXXXXXXXXX/picture?type=large) return nothing.
What's possible reason of this issue? Can anybody give me some hints?
Thanks.
The getimagesize()
requires that allow_url_fopen is set to "1" in php.ini. You may want to check that setting on your remote server.
精彩评论