FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Anonymous logins to FTP





michaelr1992
I am trying to figure out how to let anyone view all FTP files in certian folders of my website. Anyone know how?

And is there a way to let anyone upload anything they want to a certian folder, if that folder path is kept confidential?
Zzz.
Good 'night

It first of all, depends of what you exactly want to let them upload.

But you'll find several php scripts to set up on your server which will allow to do it.

Just keep in mind that PHP imposes limits on the size of uploaded files in order not to alter servers ressources. I don't have this number in mind but i remember it was no very high : turning around 5 megs and maybe even less.

EDIT : Also keep in mind that letting anyone uploading anything on your webserver, that can be a major security risk
michaelr1992
What about just viewing?
Zzz.
wow ! I'm not an expert but what do you call exactly as FTP files ?

Do you mean you want your visitor to view a complete directory list ?
michaelr1992
Just certian folders. Is that possable?
Zzz.
OK ! I've translated it from French from http://www.phpsources.org/scripts119-PHP.htm

Code:

<?

// ******************************************************/
// How to list a directory (Alpha order) using scandir() function.
// This function is disabled on some servers. If it's the case, use the
// second piece of code

 $liste_rep = scandir("./");
 $i = 0;
 $num = count($liste_rep);
 while($i < $num){
 echo "<a href=\"images/$liste_rep[$i]\">$liste_rep[$i]</a><br />";
 $i++;
 }



// *******************************************************/
// How to list a directory (Alpha order) using readdir() function.
// This function is allowed on most servers.
   
// Open the directory
  $dp = opendir($imgrep);

  $i=0;
  while ( $file = readdir($dp) )
  {
    // Remove files . and ..
    if ($file != '.' && $file != '..')
    {
            // Lets insert datas in a table
            $ListFiles[$i]=$file;
            $i++;
    }
 }
  closedir($dp);


// list decreasingly
  if(count($ListFiles)!=0)
  {
     if($list_tri == 'DESC')
     {
         rsort($ListFiles);
     }
     else
     {
         sort($ListFiles);
     }
  }

// display files in decreasing alpha order
  $i=0;
  while ( $i < count($ListFiles))
  {
      echo $ListFiles[$i];
      $i++;
  }

?>


'Hope it'll fit your needs Wink
Zzz.
Hi Michael,

So did it helps ?
michaelr1992
I dont understand any of that... is that SQL stuff?
Zzz.
This is a PHP script to insert in e.g a file index.php on the root of the folder you want to list.
michaelr1992
isnt working...
Zzz.
Sorry for this but i can't do better for you.

Maybe someone else would be able to help ?
Related topics
php admin and mysql admin console
can i upload a rar file to ftp?
Anonymous FTP...
Public ftp
FTP help [RESOLVED]
Como Montar un server ftp desde tu casa
Can't upload pages via FTP
FTP server
No access to FTP and cPanel
help with login to cpanel or ftp i cant nay
How to set up a home FTP server
VBScript help for uploading FTP.
Public (Anonymous) FTP Help
Anonymous FTP Scanner - Python Script
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Domain Names

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.