First of all i must say my english is pretty poor.
so fix me if i did a mistake.
so lets start tutorial :
fristly we need connect to port 21(ftp).
<?php
$conn = ftp_connect("ftp.codecall.com") or die("Could not connect");
ftp_login($conn,"admin","12345");
?>
on ftp_connect function we has connected to ftp.on ftp_login we connected with the username and pass.
now we can download file from ftp and etc.
for downloading file we need use function ftp_get.
let me give an example.
$file = "test.txt";
$open = fopen("test1.txt", "w");
ftp_fget($conn,$open,$file,FTP_ASCII);
and we downloaded to file test1.txt the info of test.txt .last function i will teach you will be ftp_chomd.
ftp_chomd giving premission to a file.
like 0777 ,0775 and etc.
now let me show you example of the function.
ftp_chmod($conn,"0777","chomd.txt");on the line we have been gived 0777 permssion to chomd.txt file.
Remember!
When you finish doing something with ftp functions put after it.
ftp_close($conn);
ok this is my frist tutorial on the forum.
please reply's.
:)
Edited by Orjan, 05 September 2010 - 11:27 PM.
edited the title


Sign In
Create Account

Back to top









