rendered paste body<?$newline = "<br />";$var = new readini();$file = "egold.ini";$nick = $_GET['user'];echo "Item info for".$nick;echo $newline;echo "gold Peices:";echo "$var->ReadIniValue($file, $nick, egold);echo $newline;echo "Crackers:";echo "$var->ReadIniValue($file, $nick, etickets);echo $newline;echo "Blue PartyHats:";echo "$var->ReadIniValue($file, $nick, blue);echo $newline;echo "White PartyHats:";echo "$var->ReadIniValue($file, $nick, White);echo $newline;echo "Red PartyHats:";echo "$var->ReadIniValue($file, $nick, red);echo $newline;echo "Green PartyHats:";echo "$var->ReadIniValue($file, $nick, green);echo $newline;echo "Yellow PartyHats:";echo "$var->ReadIniValue($file, $nick, yellow);echo $newline;echo "Purple PartyHats:";echo "$var->ReadIniValue($file, $nick, purple);class readini {Function ReadIniValue ($IniFile, $IniKey, $IniVar) {$this->Ini_Key = "[".strtolower($IniKey)."]";$this->Ini_Variable = strtolower($IniVar);$this->Ini_File = file($IniFile);unset($this->Ini_Value);for($Ini_Rec=0; $Ini_Rec<sizeof($this->Ini_File); $Ini_Rec++) { $this->Ini_Temp = trim($this->Ini_File[$Ini_Rec]); // Save the original var value to return it as result $this->Ini_Tmp = strtolower($this->Ini_Temp); if ( substr_count($this->Ini_Tmp, "[") > 0 ) $this->Ini_Ready = 0; if ( $this->Ini_Tmp == $this->Ini_Key ) $this->Ini_Ready = 1; If ( (substr_count($this->Ini_Tmp, "[") == 0) && ($this->Ini_Ready == 1) ) { if (substr_count($this->Ini_Tmp, $this->Ini_Variable . "=") > 0) { $this->Ini_Value = substr($this->Ini_Temp, strlen($this->Ini_Variable . "=")); return $this->Ini_Value; } }} // end for if ( !$this->Ini_Value ) { return "ERROR .: Key: [<b>".strtoupper($IniKey)."</b>] or Variable: <b>".strtoupper($IniVar)."</b>, does not exist in <b>".strtoupper($IniFile)."</b> file !"; // Key or Variable NOT FOUND in INI file }} // end function} // end class?>