I don’t think it is possible, AFAIK it’s not permitted according to DH’s ToS - any script, be it php, python or perl. BUT I could be wrong. I asked support for something similar once (although that was for a binary program, not a script), and they said no - not on a shared environment. But try and ask support as well, if you haven’t done so already.
Like my help? Enter promo code 2FORME and you get the maximum off for your plan, minus 2$ - for me.