Update FindPlayerUIDByName.php

This commit is contained in:
vbawol 2015-04-05 09:05:40 -05:00
parent 6ac2996573
commit 8d257d05a9

View File

@ -2,7 +2,10 @@
/* /*
Example PHP code - Case-insensitive search for player Name returns UID's. Example PHP code - Case-insensitive search for player Name returns UID's.
Requires: PHP5 and https://github.com/phpredis/phpredis installed 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'; $search = 'Mr. Jones';
@ -19,7 +22,7 @@ foreach ($playerNames as $key => $value) {
if (stripos($data, $search) !== false) { if (stripos($data, $search) !== false) {
$key = explode(":", $value); $key = explode(":", $value);
echo "<p>" . $key[1] . "</p>" ; echo "<p>" . $key[1] . "</p>" ;
break; break; // comment out this line if you want all matches and not just the first.
} }
} }