mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Update FindPlayerUIDByName.php
This commit is contained in:
parent
6ac2996573
commit
8d257d05a9
@ -2,7 +2,10 @@
|
||||
/*
|
||||
Example PHP code - Case-insensitive search for player Name returns UID's.
|
||||
Requires: PHP5 and https://github.com/phpredis/phpredis installed
|
||||
EpochMod.com by [VB]AWOL
|
||||
by [VB]AWOL - EpochMod.com
|
||||
|
||||
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
http://creativecommons.org/licenses/by-sa/4.0/
|
||||
*/
|
||||
|
||||
$search = 'Mr. Jones';
|
||||
@ -19,7 +22,7 @@ foreach ($playerNames as $key => $value) {
|
||||
if (stripos($data, $search) !== false) {
|
||||
$key = explode(":", $value);
|
||||
echo "<p>" . $key[1] . "</p>" ;
|
||||
break;
|
||||
break; // comment out this line if you want all matches and not just the first.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user