#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2007
    Posts
    22
    Rep Power
    0

    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://userassword@server.com/path1/path2/file.zip

    My first attempt was to make a CRON job that runs this simple script:

    "wget ftp://userassword@server.com/path1/path2/file.zip"

    Unfortunately it doesnt work. The output I receive ends with:

    "xxx.xx.x.xxx:21...failed:connection refused."

    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.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    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.
    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.

IMN logo majestic logo threadwatch logo seochat tools logo