Should I get all images with MySQL or show it with help of cURL?
I can get all images from one website by ids via curl and save ids in my database and photos in ftp.
Or I can show those images getting them directly with c开发者_Go百科URL help every page load.
Which is more optimal?
If you're planning to curl multiple times per pageload, I would highly recommend that you instead scrape them down on beforehand and store them locally. This would mean that you don't need to open (timeconsuming) connections to other hosts, and it benefits both you and the end-user.
Short answer: The most optimal approach would be to store them on beforehand, ie not using multiple curls per pageload.
精彩评论