ShibbolethSP2InstallDebianLenny: notify.php

File notify.php, 0.6 kB (added by l.suhrbier, 2 years ago)

/var/www/notify.php

Line 
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();
9curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
11curl_setopt($ch, CURLOPT_HEADER, 1);
12
13$cookies='';
14foreach ($_COOKIE as $key => $value) {
15  $cookies= $cookies . $key . '=' . $value.'; ';
16}
17curl_setopt($ch, CURLOPT_COOKIE, $cookies);
18
19foreach ( $logoutURL as $key => $url ) {
20        curl_setopt($ch, CURLOPT_URL, $url);
21        $doc=curl_exec ($ch);
22        $info = curl_getinfo( $ch);
23}
24curl_close ($ch);
25
26header('Location: ' . $_REQUEST['return'], TRUE, 302);
27exit();
28?>