Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $openid = new \LightOpenID($_SERVER['SERVER_NAME']);
- if (!$openid->mode) {
- $openid->identity = 'https://ru.wargaming.net/id/';
- header("Location: {$openid->authUrl()}");
- } elseif ($openid->mode == 'cancel') {
- print_r("Cancelled");
- } else {
- if ($openid->validate()) {
- //print_r($openid);
- $player_link = $openid->identity;
- $player_part = explode("/", $player_link);
- $player_part = explode("-", $player_part[4]);
- $player_name = $player_part[1];
- $player_wg_id = $player_part[0];
- unset($player_part);
- sprintf("Player name: %s ; WG Player ID: %s ; Profile link: %s", $player_name, $player_wg_id, $player_link);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement