Jump to content

php for ftp login


firmemente

Recommended Posts

i have a page.... universalmailing.com/login.html

i set up a specific directoty folder named FIRME

the id is firmemente
pass is mentefirme

i 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.
Link to comment
Share on other sites

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 php

Ray
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

i tried it... but still getting blank page

for $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.com

when a pop up window shows up:
id: firmemente.universalmailing.com
pass: mentefirme

from universalmailing.com/login.html
id: firmemente.universalmailing.com
pass: mentefirme

so then......

<?php
$site  =  "www.universalmailing.com"
$username  =  "firmemente.universalmailing.com" ;
$password  =  "mentefirme" ;
echo  '<a href="ftp://' .$username .':' .$password .'@' .$site .'"> Login to ftp </a>' ;
?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.