transfer a file from one domain to another via wp

Trying to use WordPress to move files between servers is like trying to use a car to mow the yard. It doesn’t work because they are the wrong tools. It can work, with a lot of custom code, but why bother? You’re going about it backwards.

If you read about SSH and SCP, you will see that you can move files directly between hosts without downloading them to your own iPad. That’s what you need to do. SSH to one host, use SCP from that shell and move the files from one host to the other.

You could write some sort of plugin that lets you use SSH from within the WordPress application layer, but again: why bother? Use SSH directly.

Bluehost commonly allows SSH access with some of their accounts; I don’t know about Hostgator.