0
votes

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 Facebook'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.

1
Have you checked the error logs? I'm guessing the request isn't being made or the response isn't coming back properly. What version of PHP are you using? - Jimmy Sawczuk

1 Answers

0
votes

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.