---
layout:      code-sample
title:       rcon
description: Executing the command <code>status</code> on a local Source server
             and displaying the output
languages:
  java: |
    SourceServer server = new SourceServer("127.0.0.1");
    try {
      server.rconAuth("passw0rd");
      System.out.println(server.rconExec("status");
    }
    catch(RCONNoAuthException e) {
      System.err.println("Could not authenticate with the game server.");
    }
  php:  |
    $server = new SourceServer('127.0.0.