Hi Guys, This is basically a code that has been wrote for a GTA SA:MP server, basically you put in their IP and it SHOULD come up with their name, but it doesnt.
Please leave suggestions on how to fix it
Project: Los Angeles Admin Panel
Logged in as: <?php echo returnUser("loginname"); ?> (<?php echo returnUser("igname"); ?>) Log out
<?php include("sidebar.php"); ?>
"; $name = $_GET['name']; if(isset($name) || $name!="" || $name!=" "); { $nameReturn = strpos($name, "_"); if($nameReturn == false) { // We got an IP to check. echo "
"; } } } } else { // We got a player name. echo "
"; } } } } } ?>
Player Search
<?php echo " Enter an IP or player name:"; $name = $_GET['name']; if(isset($name) || $name!="" || $name!=" "); { $nameReturn = strpos($name, "_"); if($nameReturn == false) { // We got an IP to check. echo "
The following accounts match the IP of ".$name.":
"; $playerfiles = scandir("../../.gameservers/samp_0/scriptfiles/users/"); foreach($playerfiles as $key => $value) { if($key > 0) { $iniparse = parse_ini_file("../../.gameservers/samp_0/scriptfiles/users/".$value, false, INI_SCANNER_RAW); if($iniparse['IP'] == $name) { echo $value ." is a match for the IP entered."; } } } } else { // We got a player name. echo "
The following are results for your query:
"; $iniparse = parse_ini_file("../../.gameservers/samp_0/scriptfiles/users/".$name.".ini", false, INI_SCANNER_RAW); $acctIP = $iniparse['IP']; echo "IP: " . $acctIP; echo "The following accounts match that IP:
"; $playerfiles = scandir("../../.gameservers/samp_0/scriptfiles/users/"); foreach($playerfiles as $key => $value) { if($key > 0) { $iniparse = parse_ini_file("../../.gameservers/samp_0/scriptfiles/users/".$value, false, INI_SCANNER_RAW); if($iniparse['IP'] == $acctIP) { echo $value ." is a match for the IP entered."; } } } } } ?>
<?php include("footer.php"); ?>