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
Did you know?Explore Trending and Topic pages for more stories like this.

$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

Data type mismatch
Hi,
I am migrating data from algol to c.I mapped real datatype in algol to double datatype in

blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:

QuoteBlah blah

Blah blah

etc
but when i ech

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

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