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 cURL help every page load.
Which is more optimal?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.