Jump to content

Recommended Posts

I got a script which retrieves the real url to someone's facebook profile picture. What I want to do is copy that picture to my own server. This worked flawlessly until four days ago. Now all I got is a connection time out. I haven't changed anything about my code in the last few days, so I really don't understand why it stopped working. It has got nothing to do with writing rights. I've also tried to configure ini settings, but without any luck (and should not be an issue since the code worked 4 days ago with the exact same image). The weird thing is that it does work with other random images from the web. Does anyone have an idea why it stopped working? the code I use is:

 

copy("https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-ash3/s2048x2048/643928_10151459968053747_138997005_n.jpg", "images/test.jpg");

 

As you can see, the url just works when pasting it into the browser. I've contacted my hosting provider to find out if they changed something in firewall / server settings, but they had no idea what could be causing this error.

 

And yes, that's me on the picture.

 

Hope someone can help me, because it's really driving me insane!

 

Best, Sascha

Link to comment
https://forums.phpfreaks.com/topic/274930-problems-with-copy-function/
Share on other sites

@Jessica: Yes that's where I use it for. After logging on to my site with facebook, I want to retrieve their latest profile picture on facebook and store it on my server (for cropping and displaying it to my needs), so users always have their latest profile picture on my site. I know I could just display the image instead of storing it, but for the cropping reasons, I'd rather copy it. Not sure how that violates with the TOS.

 

@jazzman1: I know, a friend of mine also tried it and got it working, but somehow it doesn't work on my site anymore. So the blockage that Jessica mentioned sounds like the problem..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.