API talk:Logout
Add topicAppearance
Latest comment: 11 years ago by NicoV in topic Is session shared between browser and APIĀ ?
Does this invalidate the session/editing token?Smallman12q 19:24, 24 January 2010 (UTC)
Should this be clearing the cookies? My cURL cookies.txt has remained in tact even after calling the logout action:
function logout(){
echo "Logging out<br/>";
$url = $settings['wikiroot'] . "/api.php?action=logout";
httpRequest($url);
echo "Request complete<br/>";
session_destroy();
}
logout();
$url = $settings['wikiroot'] . "/api.php?format=json";
$post = "action=query&meta=userinfo&uiprop=groups|rights|options";
$dat = httpRequest($url, $post);
if(empty($dat)){
die("No data received");
}
$json = json_decode($dat);
$user = $json->query->userinfo;
echo json_encode($user);
httpRequest source can be found here: User:Bcoughlan/Login_with_curl (13:57, 28 July 2010 MTN)
Is session shared between browser and APIĀ ?
[edit]Hi,
Is it normal that when logging out through the API on a dedicated tool you also get logged out on your browser sessionĀ ?
One user of my tool WPCleaner reported to me that when he logs out on WPCleaner, his session in his browser ends. --NicoV (talk) 12:34, 28 February 2013 (UTC)