firmemente Posted October 6, 2006 Share Posted October 6, 2006 i have a page.... universalmailing.com/login.htmli set up a specific directoty folder named FIRMEthe id is firmementepass is mentefirmei want the user when he types in his id and pass that it will open only his folder where he can upload or download files. i am new to php!!!! is there a php code to do this? any help will be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
craygo Posted October 6, 2006 Share Posted October 6, 2006 PHP is server side not client side. So any ftp coding you do will be in relation to the server not the clients box. Most you can do with php is setup a link to the ftp server and they can move files manually themselves.Example[code]<?php$username = "username";$password = "password";echo '<a href="ftp://'.$username.':'.$password.'@ftp_site_address/folder_to_go_to"> Login </a>';?>[/code]Only thing is they will be able to hit button to go to parent directory if they have access to it.You should restrict what they can see thru the ftp server software and not phpRay Quote Link to comment Share on other sites More sharing options...
firmemente Posted October 6, 2006 Author Share Posted October 6, 2006 is the sample above what i would put on the ftp.php Quote Link to comment Share on other sites More sharing options...
craygo Posted October 6, 2006 Share Posted October 6, 2006 If you have a login script, and that login script contains the username and password for the ftp, you can use this link on any page you want. It is just a link. Quote Link to comment Share on other sites More sharing options...
firmemente Posted October 6, 2006 Author Share Posted October 6, 2006 <?php$username = "firmemente.universalmailing.com";$password = "mentefirme";echo '<a href="ftp://'.$username.':'.$password.'@www.universalmailing.com"> Login </a>';?>this is what i did. if this is how it is .... the page is blank. Quote Link to comment Share on other sites More sharing options...
craygo Posted October 6, 2006 Share Posted October 6, 2006 you would have to do this[code]<?php$site = "firmemente.universalmailing.com"$username = "firmemente";$password = "mentefirme";echo '<a href="ftp://'.$username.':'.$password.'@'.$site.'"> Login to ftp </a>';?>[/code] Quote Link to comment Share on other sites More sharing options...
firmemente Posted October 6, 2006 Author Share Posted October 6, 2006 i tried it... but still getting blank pagefor $site should it not be "www.universalmailing.com"ftp://firmemente.universalmailing.com@wwww.universalmailing.com(this is what the client has to type in to get into their folder)i apologize.... the actual id is firmemente.universalmailing.comwhen a pop up window shows up:id: firmemente.universalmailing.compass: mentefirmefrom universalmailing.com/login.htmlid: firmemente.universalmailing.compass: mentefirmeso then......<?php $site = "www.universalmailing.com" $username = "firmemente.universalmailing.com" ;$password = "mentefirme" ;echo '<a href="ftp://' .$username .':' .$password .'@' .$site .'"> Login to ftp </a>' ;?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.