PHP code example of shucream0117 / discord-php

1. Go to this page and download the library: Download shucream0117/discord-php 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/ */

    

shucream0117 / discord-php example snippets


$discord = new Discord('http://your-discord-incoming-webhook-url');

// send a message with mention
$discord->sendText('this message will be posted']);

// send a message with mention
$discord->sendText('mention!!', ['12345678']);