PHP FTP connect doesn't work with correct login


Posted on 16th Feb 2014 07:03 pm by admin

Hi!

i am working on this test code:
Quote<?php

$ftp_server = "ftp.*******.it";
$ftp_user = "weburl@*******.it";
$ftp_pass = "CENSORED";

// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");

// try to login
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected as $ftp_user@$ftp_servern";
} else {
echo "Couldn't connect as $ftp_usern";
}

// close the connection
ftp_close($conn_id);
?>
even though the username and password and domain are correct i still can't connect.. when i put the same details into my filezilla it connects immediately without errors.. can anyone help?

No comments posted yet

Your Answer:

Login to answer
297 Like 12 Dislike
Previous forums Next forums
Other forums

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash