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

Big O & time complexity ???
can you help me how to calculate the Big O & time complexity for any algorithm and c++ program pleas

phpMailer not working ..........
HI,
I was playing with the phpMailer script and tried to send a smiple mail using their test scri

PHP XML extraction text
I would like to extract an xml text and have that text directly echo(print) out on my web page. Her

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

Page doesn't expand for content
Hi. I've been testing a query I made. It's here http://lapr1.6te.net/inquerito.php
The page doesn

list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date

these are the file names

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

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