Ryan Matheus Posted October 24, 2022 Share Posted October 24, 2022 Is there any documentation for the callback url, I'm creating a public interface that uses myownfreehost api and I don't know how it works Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted October 24, 2022 Share Posted October 24, 2022 The callback URL POSTs information to your client area when the API is used. For example, it will let you know when an account is suspended. Quote Link to comment Share on other sites More sharing options...
Ryan Matheus Posted October 24, 2022 Author Share Posted October 24, 2022 I know how it works, but as the POST arrives, I don't know what the index of the variable $_POST["???"] is and what values it could contain. That's why I asked if there was documentation, so I could learn exactly how this works. Quote Link to comment Share on other sites More sharing options...
Ryan Matheus Posted October 24, 2022 Author Share Posted October 24, 2022 7 minutes ago, BastelPichi said: Você pode encontrar alguma documentação aqui: https://api.myownfreehost.net/initial-setup/callbacks No entanto, isso não é oficial. Thanks, Exactly what I needed, if I have any more questions I'll add them to the forum Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted October 24, 2022 Share Posted October 24, 2022 4 hours ago, Ryan Matheus said: but as the POST arrives, I don't know what the index of the variable Note that you can always do print_r($_POST); to see what the data contains. Store the result in the DB so you can study it. Or, just use the documentation to get it right the first time Quote Link to comment Share on other sites More sharing options...
Ryan Matheus Posted October 25, 2022 Author Share Posted October 25, 2022 6 hours ago, TinkerMan said: Note that you can always do print_r($_POST); to see what the data contains. Store the result in the DB so you can study it. Or, just use the documentation to get it right the first time I know this is possible, but there are certain things I can't test without spending a long time, like when the account is deleted Quote Link to comment Share on other sites More sharing options...
Ryan Matheus Posted October 25, 2022 Author Share Posted October 25, 2022 4 hours ago, BastelPichi said: Well then only MOFH callback agent sees the result.. (lol) You can use a for clause to log all the data... Or just use some kind of request catcher to log all the data. A simple way to save all the data would be like this <?php # Codigo de exemplo para salvar o post file_put_contents("log_".time().".txt", json_encode($_POST, JSON_PRETTY_PRINT)); Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted October 25, 2022 Share Posted October 25, 2022 17 hours ago, BastelPichi said: Well then only MOFH callback agent sees the result Not if you store it in the database, no. Quote Link to comment Share on other sites More sharing options...
PlanetCloud Posted November 16, 2022 Share Posted November 16, 2022 Hi, I came waaay too late. You may find these interesting: https://github.com/InfinityFreeHosting/mofh-client/issues/41, https://github.com/InfinityFreeHosting/mofh-client/issues/46. It has response samples n stuff. also the library itself is cool and you should use it instead of making new one. Quote Link to comment Share on other sites More sharing options...
Anyx Posted November 16, 2022 Share Posted November 16, 2022 2 hours ago, BastelPichi said: I think this is already resolved. Robert S. integrated callback docs to the MOFH API docs. Yes, the API docs maintained by Robert are the best solution (if they don't have something, a simple PR will allow them to be added there). Quote Link to comment Share on other sites More sharing options...
PlanetCloud Posted November 18, 2022 Share Posted November 18, 2022 Oooo I see, okay 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.