Adding functionality for downloading from php file