PHP code example of exilestudios / eolib-php-dist

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

    

exilestudios / eolib-php-dist example snippets


    

    \Protocol\Net\PacketFamily;

    // Access packet family constants
    echo PacketFamily::CONNECTION; // Output: 1
    echo PacketFamily::ACCOUNT; // Output: 2
    echo PacketFamily::CHARACTER; // Output: 3
    // ...

    // Use packet family constants in your code
    $packetFamily = PacketFamily::LOGIN;
    if ($packetFamily === PacketFamily::LOGIN) {
        // Handle login packet
        // ...
    }