Jump to content

ftp in a browser


richiec

Recommended Posts

Hey there, I'm trying to set up a little ftp script to make it easier to upload files and add new folders for images and videos ect on a backend admin page however the following script just will not connect I keep getting the "Couldn't connect to 66.40.52.167" error so it's not even finding the server however when I put it into my browser it connects just fine, I've even pinged it and all works fine so I don't get it.

 

$ftp_server = "66.40.52.167";
$ftp_user = "username";
$ftp_pass = "password";

$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); 

if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
    echo "Connected as $ftp_user@$ftp_server\n";
} else {
    echo "Couldn't connect as $ftp_user\n";
}


ftp_close($conn_id);  

 

Any ideas would be appreciated!

Link to comment
Share on other sites

Thanks for the responces! I don't really want to use a direct ftp link with the username and password in it I would rather it be an actual script for a file manager just like the script you posted the link too.

 

I checked the script out and filled out all of the settings, not using the ip either using the actual url of ftp.freehostia.com and I'm still having an issue, it's still saying that it can't connect to ftp.freehostia.com. Is there something in the php.ini file that I would have to change/add to allow a filemanager ftp connection that's the only thing I can think of now with this script saying the same thing.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.