开发者

Call a link/URL using CURL command in PHP

开发者 https://www.devze.com 2023-02-12 03:08 出处:网络
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 ?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消