I want to logout using开发者_如何学编程 curl command from google apps account. I am using the following code but it doesn't seem to work. Where have I gone wrong ?
$ch = curl_init("https://mail.google.com/a/MY_DOMAIN.in/?logout&hl=en" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_COOKIE, 'PHPSESSID=fdbdcaa41b2075a9f90b74cd885a932b');
$r=curl_exec($ch);
curl_close($ch);
Apart from this, is there any other way I can call the above URL without showing the output to the user in PHP ? Please help ! I can furnish with any other information if you require.
call session_write_close()
before sending the request.
see this blog
精彩评论