PHP code example of ctrl / discourse

1. Go to this page and download the library: Download ctrl/discourse library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ctrl / discourse example snippets


cp Resources/examples/config.dist.php Resources/examples/config.php

php Resources/examples/groups.php

php Resources/examples/createGroup.php [NAME]

php Resources/examples/groupAdd.php [GROUP_ID] [USERNAME]

php Resources/examples/groupRemove.php [GROUP_ID] [USERNAME]

php Resources/examples/groupMembers.php [SLUG]

php Resources/examples/createCategory.php [SLUG] [HEX_COLOR] [TEXT_HEX_COLOR]

php Resources/examples/categoryLatestTopics.php [CATEGORY_SLUG]

php Resources/examples/deleteCategory.php [CATEGORY_ID]

php Resources/examples/users.php

php Resources/examples/user.php [USERNAME]

php Resources/examples/activeUsers.php