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

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but i

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

A WBS element with the name XXX already exists in version FREI_VERSION
Hi.
When I am trying to insert WBS element in a project, error occurs:

"A WBS eleme

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

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