smallhost Posted December 12, 2021 Share Posted December 12, 2021 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! Quote Link to comment Share on other sites More sharing options...
smallhost Posted December 13, 2021 Author Share Posted December 13, 2021 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. Quote Link to comment Share on other sites More sharing options...
JaiktDev Posted December 14, 2021 Share Posted December 14, 2021 Hey, so you're building a direct login to the online file manager? I think I made one saved somewhere. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted December 14, 2021 Share Posted December 14, 2021 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); Quote Link to comment Share on other sites More sharing options...
smallhost Posted December 15, 2021 Author Share Posted December 15, 2021 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! Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted December 15, 2021 Share Posted December 15, 2021 14 minutes ago, smallhost said: even sat up a way that users can sign in on mobile by scanning a QR code. I would LOVE to know what that system works! I shall check out your client area now and let you know what I think! Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted December 15, 2021 Share Posted December 15, 2021 (edited) 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 December 15, 2021 by TinkerMan Quote Link to comment Share on other sites More sharing options...
smallhost Posted December 15, 2021 Author Share Posted December 15, 2021 Just now, TinkerMan said: 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! Oh no, that shouldn't be happening! Checking on that ASAP. Quote Link to comment Share on other sites More sharing options...
smallhost Posted December 15, 2021 Author Share Posted December 15, 2021 @TinkerManI meant to type minlength, not maxlength! Just made a test account and it should work now. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted December 15, 2021 Share Posted December 15, 2021 (edited) 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 December 15, 2021 by TinkerMan 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.