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

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

Calling strings from other php class
I have test1.php{
$string1;
$string2;
....
... //10 strings in this class <

How to change www in url with a specified name
Hi
I'm trying to change the url http://www.sitename.com/apparels to something like below
http:

PECL uploadprogress for php5.2
Hey, I just installed PHP5 via .htaccess on my 1and1 Shared Hosting Account.

How would I exac

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

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