Adding/Deleting Media files programtically

Welcome to the community, @malembo! Here is a sample of how you can do this by using a Python Script:

Maybe you can make necessary changes as needed for the PHP script.