php - download service, controlling file access -
i have wordpress site people buy access downloads through woocommerce plugin. there several thousand downloads each order , have found woocommerce inefficient when handling large amounts of downloads. the download files product1_date.pdf product2_date.pdf etc... i can't change this i need php solution which admin can upload files directory via ftp users buy product can download them in download area users cannot access files products haven't purchased guessing filename 1 , 2 can handle, how prevent 3? there way can set file permissions read specific user has purchased? or possible make directory writable (so can uploaded) files readable apache , serve files user other way? first, must stop hotlinks! after, create downloader file contain of downloader function. this's parameters file mime-type, file name, file url etc... users can download downloader file. function first control users access, after accept user want or not accept. return