From f2f289d723307d1f21f42e6543471d695936a5f2 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 5 Apr 2015 09:08:28 -0500 Subject: [PATCH] Update FindPlayerUIDByName.php --- Tools/PHP/FindPlayerUIDByName.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/PHP/FindPlayerUIDByName.php b/Tools/PHP/FindPlayerUIDByName.php index 893cfe38..3813e328 100644 --- a/Tools/PHP/FindPlayerUIDByName.php +++ b/Tools/PHP/FindPlayerUIDByName.php @@ -14,14 +14,15 @@ $redis = new Redis(); $redis->pconnect(127.0.0.1, 6379, 2.5, "Server1"); $redis->auth("yourlongasspasswordhere"); +// get all players names in database $playerNames = $redis->keys('PlayerData:*'); // print all UID's matching player name foreach ($playerNames as $key => $value) { $data = $redis->get($value); if (stripos($data, $search) !== false) { - $key = explode(":", $value); - echo "

" . $key[1] . "

" ; + $UID_raw = explode(":", $value); + echo "

" . $UID_raw[1] . "

" ; break; // comment out this line if you want all matches and not just the first. } }