<?php
/* 
 * Sample request to EID
 */
include_once('eid_functions.inc.php');

$MsgId=EID_NewMsgId();
$ret = EID_Initiate(array(
	'MsgId' => $MsgId, 
	'ReturnUrl' => $eid_cfg['ReturnUrl'],
	'IdentityData' => array(
		'FirstName'	    => 'Karl',
		'LastName'      => 'Netzzahler',
		'DateOfBirth'   => '1959-02-14',
		'Street'        => 'Geiselbergstr. 21 - 25 (Abt. E',
		'ZipCode'       => '1110',
		'Town'          => 'Wien',
		'Country'		=> 'AT'
	))
);
if ($ret['ResponseMessage'] || !$ret['RedirectURL']) die($ret['ResponseMessage']);
if (!headers_sent()) header("Location:".$ret['RedirectURL']); else echo "<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=".$ret['RedirectURL']."\">";

/* Only needed if you want to check with EID_Status() later instead of confirmation,
   for simplicity we store it in session. */
session_start();
$_SESSION['eidReq']=$ret;
unset($_SESSION['eidReq']['RedirectURL']);
?>
