On the server, we can provide a text file for each user, containing a list of custom keys. In each card set folder in the data/ directory, we can include a text file with custom tags. If the file is missing or empty, any user will be able to access it. If the file contains tags, then only users whose personal file contains one of those tags can access it.
The PHP script will then need to:
Receive the user's id
Read the user's custom key file
Look for a tag file in each subfolder of the data/ directory
Skip the directory if there is a tag file, but none of the user's keys match
Card sets visible to one user on a given device might need to be hidden from other users. If a user later earns a custom key, then the card set already downloaded should become immediately available.
On the server, we can provide a text file for each user, containing a list of custom keys. In each card set folder in the data/ directory, we can include a text file with custom tags. If the file is missing or empty, any user will be able to access it. If the file contains tags, then only users whose personal file contains one of those tags can access it.
The PHP script will then need to:
Card sets visible to one user on a given device might need to be hidden from other users. If a user later earns a custom key, then the card set already downloaded should become immediately available.