Project

General

Profile

ShibbolethSP2InstallDebianLenny » notify.php

/var/www/notify.php - Lutz Suhrbier, 03/04/2010 06:44 PM

 
1
<?php
2

    
3
$logoutURL = array(
4
  'http://your.host.org/drupal5/?q=logout',
5
  'http://your.host.org/drupal6/?q=logout'
6
);
7

    
8
$ch = curl_init();
9
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
11
curl_setopt($ch, CURLOPT_HEADER, 1);
12

    
13
$cookies='';
14
foreach ($_COOKIE as $key => $value) {
15
  $cookies= $cookies . $key . '=' . $value.'; ';
16
}
17
curl_setopt($ch, CURLOPT_COOKIE, $cookies);
18

    
19
foreach ( $logoutURL as $key => $url ) {
20
	curl_setopt($ch, CURLOPT_URL, $url);
21
	$doc=curl_exec ($ch);
22
	$info = curl_getinfo( $ch);
23
}
24
curl_close ($ch);
25

    
26
header('Location: ' . $_REQUEST['return'], TRUE, 302);
27
exit();
28
?>
(12-12/18)