php - Watermark 2000+ images at once? -


i have image hosting service , people upload offline (they upload computer station without internet access) , sync images (they aren't watermarked @ stage) , not approved @ point.

there admin area user go approve image, , apply watermark @ stage.

i wondering method best watermark 2000ish images using php (at time). creating system daemon , waiting response idea or?

performing such tasks on such high number of files not idea php, @ least when plan execute script via http. reason timeout of php script, 30s (and shouldn't set high).

the best option solve such things create script or daemon runs directly on server , converts new image automatically (or after being told so). continue run when current php script has finished. background process example update statistics database php script can fetch information process.

another way, use thumbnail generation of private gallery, split high number of tasks smaller jobs can worked in 30s limit. in case, limit 50 pictures per execution (it handle lot more, want safe). call script, gets first 50 not-already-completed filenames database, thing on each file , returns. , click f5 let script next 50 files. ~2000 images, wise automate f5-hitting, example putting javascript on page refreshes after loaded completely.

if have possibilites go first option, that, have found second option quite useful shared hosting (which use currently).


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -