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

Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

UDP Multicast question
Hey,

Im not really in the know when it comes to network related programming and activitie

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

How to insert random unique values in 2 columns ?
I have table with 2 columns

Create Table code_for_code (
first_code varchar2(10) uni

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