Update get_media.php

Finished prelim logic.  This has not been test compiled or anything yet