Ulti Posted July 9, 2017 Share Posted July 9, 2017 Hello, I am working on a panel using the MOFH API, I want to sync suspended accounts between both sides using the callback URL, however, I can't find any documentation on what the callback URL sends, and how to read it. Does anyone know what it sends, and what have you done to read it? Quote Link to comment Share on other sites More sharing options...
BSthuliwal Posted July 10, 2017 Share Posted July 10, 2017 PM Hans. Hope he would help you. Quote Link to comment Share on other sites More sharing options...
InfinityFree Posted July 10, 2017 Share Posted July 10, 2017 First of all, I don't answer PMs like that. I'm happy to engage in public discussion, but I don't give personal support in coding. Whenever an account status changes, that URL is called with three post variables: 'username', 'status' and 'comments'. The username is the FTP username (like host_123456789), the status can be ACTIVATE, DELETE, SUSPENDED or REACTIVATE and the comments contain additional information. You can use that information to keep the known account status updated. Quote Link to comment Share on other sites More sharing options...
Dog2puppy Posted August 11, 2017 Share Posted August 11, 2017 On 7/10/2017 at 7:53 AM, InfinityFree said: First of all, I don't answer PMs like that. I'm happy to engage in public discussion, but I don't give personal support in coding. Whenever an account status changes, that URL is called with three post variables: 'username', 'status' and 'comments'. The username is the FTP username (like host_123456789), the status can be ACTIVATE, DELETE, SUSPENDED or REACTIVATE and the comments contain additional information. You can use that information to keep the known account status updated. What would the best way to see the comments? Something like a var_dump() but it would need to be stored so you could go in and see the result. Quote Link to comment Share on other sites More sharing options...
InfinityFree Posted August 14, 2017 Share Posted August 14, 2017 On 8/11/2017 at 6:21 PM, Dog2puppy said: What would the best way to see the comments? Something like a var_dump() but it would need to be stored so you could go in and see the result. On InfinityFree.net, I store the full comment when it arrives and I extract data from it to determine what kind of suspension it is at runtime. That logic is probably one of the most changed things in my system, so keeping the raw data is highly recommended. Quote Link to comment Share on other sites More sharing options...
Dog2puppy Posted August 14, 2017 Share Posted August 14, 2017 6 hours ago, InfinityFree said: On InfinityFree.net, I store the full comment when it arrives and I extract data from it to determine what kind of suspension it is at runtime. That logic is probably one of the most changed things in my system, so keeping the raw data is highly recommended. Okay. I think taking the comments and doing var_dump on it and sorting the result in MySQL for later viewing is best. Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 hello I am waiting for your support for free hosting project in turkey I do not have any information about api I am using whmcs system but I can not integrate please help Quote Link to comment Share on other sites More sharing options...
BSthuliwal Posted September 15, 2017 Share Posted September 15, 2017 26 minutes ago, selamhosting said: hello I am waiting for your support for free hosting project in turkey I do not have any information about api I am using whmcs system but I can not integrate please help just add server create plan and you are done. Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 please give me your passwords, please help me, I need a lot, gentleman Quote Link to comment Share on other sites More sharing options...
BSthuliwal Posted September 15, 2017 Share Posted September 15, 2017 Just now, BSthuliwal said: just add server create plan and you are done. rest is upto you how you want to customize to suit your needs. Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 I do not know where you add these codes, whmcs is an external script Example use \HansAdema\MofhClient\Client; // Create a new API client with your API credentials. $client = Client::create([ 'apiUsername' => 'your_api_username', 'apiPassword' => 'your_api_password', 'plan' => 'my_plan', // Optional, you can define it here or define it with the createAccount call. ]); // Create a request object to create the request. $request = $client->createAccount([ 'username' => 'abcdefgh', // A unique, 8 character identifier of the account. 'password' => 'password123', // A password to login to the control panel, FTP and databases. 'domain' => 'userdomain.example.com', // Can be a subdomain or a custom domain. 'email' => '[email protected]', // The email address of the user. 'plan' => 'my_plan', // Optional, you can submit a hosting plan here or with the Client instantiation. ]); // Send the API request and keep the response. $response = $request->send(); // Check whether the request was successful. if ($response->isSuccessful()) { echo 'You can login as: ' . $response->getVpUsername(); } else { echo 'Failed to create account: ' . $response->getMessage(); } Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 We can include php script plesea ? Quote Link to comment Share on other sites More sharing options...
mike Posted September 15, 2017 Share Posted September 15, 2017 12 minutes ago, selamhosting said: I do not know where you add these codes, whmcs is an external script Example use \HansAdema\MofhClient\Client; // Create a new API client with your API credentials. $client = Client::create([ 'apiUsername' => 'your_api_username', 'apiPassword' => 'your_api_password', 'plan' => 'my_plan', // Optional, you can define it here or define it with the createAccount call. ]); // Create a request object to create the request. $request = $client->createAccount([ 'username' => 'abcdefgh', // A unique, 8 character identifier of the account. 'password' => 'password123', // A password to login to the control panel, FTP and databases. 'domain' => 'userdomain.example.com', // Can be a subdomain or a custom domain. 'email' => '[email protected]', // The email address of the user. 'plan' => 'my_plan', // Optional, you can submit a hosting plan here or with the Client instantiation. ]); // Send the API request and keep the response. $response = $request->send(); // Check whether the request was successful. if ($response->isSuccessful()) { echo 'You can login as: ' . $response->getVpUsername(); } else { echo 'Failed to create account: ' . $response->getMessage(); } This just seems to be the scrypt that sits between the signup form and the server. Basically, you create a form and use this script to send details to byet servers. Im Not 100% sure if this is the only thing it does, as I haven't checked the entire source code of Hans scrypt. Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 How can I integrate the php script with a sample file yada script is missing Quote Link to comment Share on other sites More sharing options...
mike Posted September 15, 2017 Share Posted September 15, 2017 2 minutes ago, selamhosting said: How can I integrate the php script with a sample file yada script is missing Just code it yourself. And what is yada ? Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 Do you have a ready-made script to help me integrate MyOwnFreeHost Quote Link to comment Share on other sites More sharing options...
selamhosting Posted September 15, 2017 Share Posted September 15, 2017 image 1 https://prntscr.com/glgn4b image 2 https://prntscr.com/glgngm how to integrate yada how to put files in the picture Quote Link to comment Share on other sites More sharing options...
InfinityFree Posted September 16, 2017 Share Posted September 16, 2017 23 hours ago, selamhosting said: image 1 https://prntscr.com/glgn4b image 2 https://prntscr.com/glgngm how to integrate yada how to put files in the picture The script should be installed with Composer. Downloading the script as a ZIP file and trying to integrate the files directly in your app is hard, if not impossible. If you don't know about Composer, I highly recommend to learn it. Quote Link to comment Share on other sites More sharing options...
Dog2puppy Posted September 18, 2017 Share Posted September 18, 2017 On 9/16/2017 at 6:38 AM, InfinityFree said: The script should be installed with Composer. Downloading the script as a ZIP file and trying to integrate the files directly in your app is hard, if not impossible. If you don't know about Composer, I highly recommend to learn it. MyOwnFreeHost doesn't support Composer. Quote Link to comment Share on other sites More sharing options...
InfinityFree Posted September 19, 2017 Share Posted September 19, 2017 On 9/18/2017 at 2:12 AM, Dog2puppy said: MyOwnFreeHost doesn't support Composer. Depends on what you mean by "support". If you mean "you can execute Composer commands on the hosting server", then no. But you can install the dependencies on your own computer and upload them to a free hosting account and they will work perfectly. Quote Link to comment Share on other sites More sharing options...
weytar Posted October 23, 2017 Share Posted October 23, 2017 Pleaase install video Quote Link to comment Share on other sites More sharing options...
mike Posted October 24, 2017 Share Posted October 24, 2017 16 hours ago, weytar said: Pleaase install video Go to youtube, and there will surely be a video explaining how to use composer. Quote Link to comment Share on other sites More sharing options...
weytar Posted October 24, 2017 Share Posted October 24, 2017 56 minutes ago, mike said: Go to youtube, and there will surely be a video explaining how to use composer. Link ? Quote Link to comment Share on other sites More sharing options...
mike Posted October 24, 2017 Share Posted October 24, 2017 Google --> Youtube --> search " how to use composer ". Simple. Quote Link to comment Share on other sites More sharing options...
weytar Posted October 24, 2017 Share Posted October 24, 2017 Installation failed, reverting ./composer.json to its original content. 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.