x_goose_x
04-17-2003, 12:27 AM
This is for ConfusedOfLife, it was a bit off subject from my post, so I started a new thread...
Here's a basic ftp upload script:
<?php
$server = "127.0.0.1";
$port = 21;
$to = 120;
$usr = "john123";
$pass = "abc123";
$src = "source.php";
$dest = "destination.php";
$ftp = ftp_connect ($server, $port, $to);
ftp_login ($ftp, $usr, $pass);
ftp_put ($ftp, $dest, $src, FTP_BINARY);
ftp_close($ftp);
?>
You might also want to check out:
http://www.php.net/manual/en/ref.ftp.php
Nothing like going to the source.
When I try to connect using the dns name of my server I get an error, but if I use the IP it works, just a little warning in case it happens to you too.
Here's a basic ftp upload script:
<?php
$server = "127.0.0.1";
$port = 21;
$to = 120;
$usr = "john123";
$pass = "abc123";
$src = "source.php";
$dest = "destination.php";
$ftp = ftp_connect ($server, $port, $to);
ftp_login ($ftp, $usr, $pass);
ftp_put ($ftp, $dest, $src, FTP_BINARY);
ftp_close($ftp);
?>
You might also want to check out:
http://www.php.net/manual/en/ref.ftp.php
Nothing like going to the source.
When I try to connect using the dns name of my server I get an error, but if I use the IP it works, just a little warning in case it happens to you too.