How to use Request in Class PHP
<p>I'm try to call request from web but not working , this code call command game server from website.</p>

<pre><code>class SampRconAPI
{

private $command;

public function __construct()
{
    $this-&gt;command = $_REQUEST["command"];
}

if($this-&gt;command == "cmdlist")
{
    $aCommands = $this-&gt;packetSend('cmdlist');
    unset($aCommands[0]);

    foreach($aCommands as &amp;$sCommand)
    {
        $sCommand = trim($sCommand);
    }

    return $aCommands;
}
</code></pre>

<p>My Error:</p>

<blockquote>
  <p>A PHP Error was encountered</p>
  
  <p>Severity: Notice</p>
  
  <p>Message: Undefined index: command</p>
  
  <p>Filename: include/SampRcon.php</p>
  
  <p>Line Number: 7</p>
</blockquote>