php copy images from web to my website (not working)

Asked by:
HubFans / n/a Points
Time:
2016-02-14 11:11 pm EST
Category:
Website Troubleshooting
Hits:
109
All I want to do is run a php script once a day (by setting up a Cron Job) to copy a couple hundred Facebook profile photos to my high school alumni website (hosted here). The reason for doing this is so the Wayback Machine will archive the images (it cannot archive if I hotlink to FB). According to Q&A sites the following line of php code should do the trick, but it's not working:

copy('http://graph.facebook.com/1495335929/picture?type=large', 'tmp/pic.jpg');

Any suggestions?

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

ScottM
Staff
16,266 Points
2016-02-15 3:16 pm EST
Hello,

Thank you for your question regarding importing facebook data to your site. Without seeing specific code, I cannot really give any advice on how it should work. We don't really offer any coding support, but are happy to eyeball something to see if anything stands out. Also, are you getting any error messages that you may be able to give us? Oftentimes that can help us when other information is vague.

Kindest Regards,
Scott M

To submit a comment on this answer, please first login.

Thank you for your response Scott. It turns out php copy was working after all. The images just weren't showing up in my Transmit window last night for some reason (not sure why, but no big deal). Will set up the cron job now.

Thanks again,
Mark
lhs78org
3 Points

2016-02-15 9:40 pm EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.