[BETA] Maniaplanet Web Services SDK for PHP

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

ThePooN
Posts: 124
Joined: 15 Jul 2012, 15:27

Re: [BETA] Maniaplanet Web Services SDK for PHP

Post by ThePooN »

Sorry for bumping.
Slig wrote:Once connected with ManiaConnect, when calling :
$trackmania->logout();
header('Location: '.$logoutURL);
we actually get the maniaplanet sign-in page., which is bad as the user just wanted to logout and not to logon again... without a way to back to original site !

It should just register the logout then redo a location to the original page.

(i did not checked, but it is probably the same for trackmania webservices ?)

I actually have the same problem: with my web browser it redirects me to the login page (without logging me out after!). So it doesn't work.
Same with ManiaPlanet. When I click on my logout button, it redirect me on my page, without doing anything. Sometimes (when spamming) it shows me that an error occured.

Maybe I'm not doing it correctly?

If you need my code and a manialink to test, PM me.

(didn't create a new topic cuz i have the same problem as Slig, who reported it here)
TheBigMiike
Posts: 1256
Joined: 06 Mar 2013, 16:12
Location: Vendée | France
Contact:

Re: [BETA] Maniaplanet Web Services SDK for PHP

Post by TheBigMiike »

In my side, the logout action works well and redirects me to the login page (which is normal).

Try to unset the sessions variables.
Image Image
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: [BETA] Maniaplanet Web Services SDK for PHP

Post by steeffeen »

//Edit: forget my post

uhm no idea who came up with

Code: Select all

header('Location: '.$logoutURL);
but the logout method logs out the user and that should be it
if you redirect the user (with a Location header) to the maniaplanet page, that's your own fault
?[/size]
Last edited by steeffeen on 21 Aug 2014, 01:00, edited 2 times in total.
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    ThePooN
    Posts: 124
    Joined: 15 Jul 2012, 15:27

    Re: [BETA] Maniaplanet Web Services SDK for PHP

    Post by ThePooN »

    Thanks for your replies :).
    steeffeen wrote:if you redirect the user (with a Location header) to the maniaplanet page, that's your own fault?
    I used the URL obtained this way to log out:
    $maniaconnect->getLogoutURL();

    But it wasn't working and I had the problem that I mentionned in my previous post.
    Why wouldn't it works? In my opinion, this should revokes application's permissions, and so, log out the player.
    TheBigMiike wrote:Try to unset the sessions variables.
    IT WORKS!
    Many thanks :) :1010

    EDIT : If I came up with this problem... maybe it's again because of the lack of documentation here (or I didn't find them?) :(
    Post Reply

    Return to “Maniaplanet Web Services”

    Who is online

    Users browsing this forum: No registered users and 2 guests