- substr: documentation ( source)
- basename: documentation ( source)
- strpos: documentation ( source)
<?php
$conn = ftp_connect("ftp.filmha.org") or die("Cannot connect to FTP server");
$log = ftp_login($conn, "hamed@film-ha.com", "11205h");
$raw = ftp_nlist($conn, "/wp-jadval-serial");
ftp_close($conn);
echo '<a href="/'.basename($file).'">';
foreach($raw AS $file){
if(substr($file, 0, 1) != '.' && strpos($file, '.')){
echo $file . "<br></a>";
}
}
?>