fatal error in php code
<p>I am running a php program control.php which calls another program functions.php but there is an error
my programs are given below</p>

<p><strong>CONTROL.PHP</strong></p>

<pre><code>$sleeptime = 125000;
require("functions.php");

$temp = $_SERVER['argv'][1];
if (is_numeric($temp)) {
    if ($temp &gt;= 66 &amp;&amp; $temp &lt;= 88) {
        echo "Setting temperature to {$temp}F...\n";
        flush();
        usleep($sleeptime);
        reset_ac();
        $up = $temp - 66;
        updeg($up);
        echo "Done.\n";



    } else {
        echo "Temperature must be a number between 66 and 88!\n";
    }
} else {
    echo "Temperature must be a number!\n";
}
</code></pre>

<p><strong>FUNCTIONS.PHP</strong></p>

<pre><code>//relay control board functions
$relay['ip'] = "192.168.10.180";
$relay['read'] = "public";
$relay['write'] = "private";
$relay['base'] = ".1.3.6.1.4.1.19865.1.2.";
$relay['base'] = ".1.3.6.1.4.1.19865.1.2.";

$relay['num'][1] = "1.1.0";
$relay['num'][2] = "1.2.0";
$relay['num'][3] = "1.3.0";
$relay['num'][4] = "1.4.0";
$relay['num'][5] = "1.5.0";
$relay['num'][6] = "1.6.0";
$relay['num'][7] = "1.7.0";
$relay['num'][8] = "1.8.0";
$relay['num'][9] =  "2.1.0";
$relay['num'][10] = "2.2.0";
$relay['num'][11] = "2.3.0";
$relay['num'][12] = "2.4.0";
$relay['num'][13] = "2.5.0";
$relay['num'][14] = "2.6.0";
$relay['num'][15] = "2.7.0";
$relay['num'][16] = "2.8.0";
$relay['num'][17] = "3.1.0";
$relay['num'][18] = "3.2.0";
$relay['num'][19] = "3.3.0";
$relay['num'][20] = "3.4.0";
$relay['num'][21] = "3.5.0";
$relay['num'][22] = "3.6.0";
$relay['num'][23] = "3.7.0";
$relay['num'][24] = "3.8.0";

//returns the value of the specified relay
function getrelay($val) {
    global $relay;
    $data = snmpget($relay['ip'],$relay['read'],"{$relay['base']}{$relay['num'][$val]}");
    return $data;
}

//sets a specified relay on or off
function setrelay($val, $val2) {
    global $relay;
    $data = snmpset($relay['ip'],$relay['write'],"{$relay['base']}{$relay['num'][$val]}","i","$val2","0");
    return $data;
}

//resets all relays to off
function clear() {
    for ($a = 1; $a &lt;= 16; $a++) {
        setrelay($a, 0);
    }
}

function reset_ac() {
    global $sleeptime;
    echo "Resetting to 66F";
    for ($a = 1; $a &lt;= 22; $a++) {
        setrelay(1,1);
        echo ".";

        flush();
        usleep($sleeptime);
        setrelay(1,0);

        flush();
        usleep($sleeptime);
    }
    echo " Done.\n";
}

function updeg($deg) {
    global $sleeptime;
    echo "Stepping up {$deg}F";
    for ($a = 1; $a &lt;= $deg; $a++) {
        setrelay(2,1);
        echo ".";

        flush();
        usleep($sleeptime);
        setrelay(2,0);

        flush();
        usleep($sleeptime);
    }
    echo " Done.\n";
}

function downdeg($deg) {
    global $sleeptime;
    echo "Stepping up {$deg}F";
    for ($a = 1; $a &lt;= $deg; $a++) {
        setrelay(1,1);
        echo ".";

        flush();
        usleep($sleeptime);
        setrelay(1,0);

        flush();        
        usleep($sleeptime);
    }
    echo " Done.\n";
}
</code></pre>

<p>The error is showing as <strong>Fatal Error : Unable to define snmpset() in /root/functions.php on line 44</strong></p>

<p>Please help</p>
