Get player login

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
User avatar
danodude
Posts: 176
Joined: 01 Dec 2011, 12:25
Location: Western Australia

Get player login

Post by danodude »

Hey, guess who's back asking questions? :oops:

Was just wondering how to get the login of whoever visits a manialink? I'm sure its simple... I'm guessing some PHP script?

Thanks :thumbsup:
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Get player login

Post by magnetik »

Hi,

You have to use ManiaConnect. We give a PHP SDK: https://github.com/maniaplanet/maniaplanet-ws-sdk

A reference is available here: http://maniaplanet.github.io/documentat ... rence.json

And you can get help here : http://forum.maniaplanet.com/viewforum.php?f=282

Happy coding :thumbsup:
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Get player login

Post by steeffeen »

or use maniascript ;)
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    danodude
    Posts: 176
    Joined: 01 Dec 2011, 12:25
    Location: Western Australia

    Re: Get player login

    Post by danodude »

    Thanks guys, I'll check out ManiaConnect. Seems awesome :thumbsup:

    steeffeen: what's the code for that in ManiaScript? I haven't tried using MS & Manialinks yet ;)
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2463
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Get player login

    Post by steeffeen »

    well the manialink script has basic access to the current user, such as login and nickname
    the script could then send the data to the server, though the server would of course only know this data afterwards but not in the moment of the request, maniaconnect would give you that information directly

    i don't really know what you want to do with the data so you have to validate both ways

    the relevant classes are CMlScript, CUser, CHttpManager

    Code: Select all

    Http.CreateGet("url?login="^LocalUser.Login);
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      User avatar
      danodude
      Posts: 176
      Joined: 01 Dec 2011, 12:25
      Location: Western Australia

      Re: Get player login

      Post by danodude »

      Thanks a ton :thumbsup:
      Post Reply

      Return to “ManiaLink”

      Who is online

      Users browsing this forum: No registered users and 1 guest