开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜