Jump to content
[MUST READ] Forum Rules ×

Making a client panel


smallhost

Recommended Posts

Hello! It's SmallHost here and I'm working on making a client panel. The concept is basically this...

  • User signs in with their SmallHost account
  • SmallHost attempts to connect to the account via FTP to check the login
  • If the connection works, assign a cookie with their encoded login info to access the client panel and redirect them to the client panel. If not, show an error.

However, I think I ran into an issue with this. I had my account suspended for using a redirect tag and I don't want to deal with contacting support again (thanks for reactivating my account, iFastNet!). I also don't know if using FTP connections would work as I tried using file_get_contents once and that didn't work.

Has anyone created a client panel, and how did they do it? How can I make a client panel?

Thank you and have a great day! :)

Link to comment
Share on other sites

Thanks for replying! I'm working on implementing the FTP login check into the site. My account got suspended for using a META redirect (got it reactivated), however using a PHP Header tag doesn't seem to result in suspension (I use this for the old login page so users can access the file manager) and I strongly recommend using PHP tags.

Link to comment
Share on other sites

9 hours ago, TinkerMan said:

Is this what you are looking for @smallhost?

 


$key = str_replace('\/','/', json_encode(['t'=>'ftp','c'=>['v'=>1,'p'=>$account_password,'i' => "/".$domain."/htdocs/"]]));
$link = "https://filemanager.ai/new/#/c/ftpupload.net/".$account_username.'/'.base64_encode($key);

 

Thank you for replying! Let me explain what I did...

  • I just added client login to SmallHost, thanks for your help! I'll share a public version of the  source code for that later. Basically the user logins with their info and SmallHost connects to the FTP server to check if the info is correct.  If it is, it creates an encoded cookie with that information. I then use the encoded cookie throughout the client panel (for example, so the users can access the control panel or file manager with a click of a button without needing to keep logging in). The client panel is now online, and I even sat up a way that users can sign in on mobile by scanning a QR code. I'm still working on making SmallHost better! :)
  • Regarding making a direct login to the file manager, I did that prior to working on a better client panel. I realized that the link when you click the File Manager button on the vPanel uses an encoded version of your password. Using this tool, I decoded it and made this code (you can use it, if it's helpful)...
<?php 
$pw = '{"t":"ftp","c":{"v":0,"p":"'.$_POST['passwd'].'"}}';
$encodePw = base64_encode($pw);
header("Location: https://filemanager.ai/new/#/c/185.27.134.11/".$_POST['uname']."/".$encodePw);
die();
?>

The client panel is now up and running, however I'm still working on making it better and adding new features. Thank you all for your help!

Link to comment
Share on other sites

I cannot signup!

 

You password field is restricting me only 8 characters, and I always get the "This domain is not available" message from iFastNet (And I cannot enter a ridiculously long one since there is a length restriction on that page too)!

Edited by TinkerMan
Link to comment
Share on other sites

Looks like you still got a length limit on the "Site Name" field. 

 

Other than the odd bullet points, they can be removed with...

ul{
    list-style: none;
}

or by replacing the list with <p> and using "text-align: center;", everything looks good!

 

EDIT: Why did you put the code within a quote Invision? 

Edited by TinkerMan
Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...