maybe is server connection slow, have you tried to upload through FTP? if you have the same speed there then is nothing wrong with the script.