AUTOMATIC INTEGRATION

Works on any server with PHP installed

ArrowChat requires that PHP is installed on your server as well as a MySQL or MSSQL database. Your website doesn't have to be written in PHP.

ArrowChat Requirements

Build a custom integration

ArrowChat includes a single integration file which you can customize to integrate ArrowChat right into your site. You can install ArrowChat in "Guest only" mode with no extra coding as well. We also have a professional installation service where we'll do everything for you.

function get_user_id()
{
    $userid = NULL;
   
    // Get the logged in user's ID by cookie or session
    if (isset($_SESSION['userid']))
    {
        $userid = $_SESSION['userid'];
    }
 
    return $userid;
}
function get_avatar($image, $user_id)
{
    global $base_url;
   
    // Check if the file exists. If not, show the no avatar default image
    if (is_file($base_url . '/images/' . $image . '.gif'))
    {
        return $base_url . '../images/' . $image . '.gif';
    }
    else
    {
        return $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.png";
    }
}
function get_group_id($user_id)
{  
    global $db;
   
    $group_ids = array();
 
   
    // Get all the groups the user ID is in
    $result = $db->execute("
        SELECT group_id
        FROM " . TABLE_PREFIX . "user_group
        WHERE user_id = '" . $db->escape_string($user_id) . "'
    ");
 
    if ($result AND $db->count_select() > 0)
    {    
        while ($row = $db->fetch_array($result))
        {
            // Fill the group IDs into an array
            $group_ids[] = $row['group_id'];
        }
         
        return $group_ids;
    }
    else
    {
        return NULL;
    }
}