January 14th, 2010, 09:23 AM
FTP "get" alternative method for godaddy account?
I am working on a site hosted at godaddy that requires a daily download of a certain file from an FTP host. The usual link we used was in the format of ftp://firstname.lastname@example.org/path1/path2/file.zip
My first attempt was to make a CRON job that runs this simple script:
Unfortunately it doesnt work. The output I receive ends with:
When I try this script on my own dedicated server it works perfectly, without changing anything in the script.
So my next attempt was to use PHP's ftp_connect() and ftp_get() functions... well, that didn't work either. It won't even connect. And, as with the CRON job, it works perfectly on my dedicated server.
This leads me to believe that godaddy has some kind of block on FTP connection from within a script or something. Is there any other alternative to automatically retrieving this file? Thanks very much.
January 14th, 2010, 09:16 PM
That is likely. The server's firewall is probably configured to block outgoing FTP connections. If I were you I would E-Mail GoDaddy and ask them to unblock port 21 outbound.
I recently ran into a similar problem on one of my sites hosted by Hostgator. Size-wise Hostgator is in the same league as GoDaddy when it comes to shared hosting, and the port I was asking them to unblock was far more obscure than FTP so it wouldn't be unreasonable to expect GoDaddy to unblock it for you. Hostgator's technician changed the firewall rules on the shared server and unblocked the port for me only a few hours after I submitted my support ticket.