I need help I want to develop in php code to redirect the browser to one specific folder (FTP) using password upon login in that folder only that folder they can access.

Hi Cente, I got a bit lost in your description but here're my five cents:

  • to redirect a browser to FTP use header("Location: ftp://example.com/directory/file"); . It's the same as with HTTP.
  • URL that contains username and password looks like this: ftp://user:password@example.com/directory/file
  • To assign privileges to an FTP account (e.g. to have access to a single directory only) you have to use your webhosting control panel. Or edit your FTP server's configuration, in case you're running your own box. If you want to lock an FTP user in a subdirectory so that he cannot get out of it through ".." you're looking for a chroot option.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.