Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>PHP</title>
</head>
<?php
include('client.php');
?>
<body>
<h3>PHP-basierter HTTP-Client</h3>
<?php
$debug=false;
/**
* Main.
*
*/
try {
$sessionInfo=login('http://stattbuchung.de', 'myLoginName', 'myLoginPass', $debug);
// analog zum im Java.Beispiel beschriebenen Vorgehen:
// $resp=get($sessionInfo, myUsefullOpcode, myParams, $debug) ;
// $resp=post($sessionInfo, myUsefullOpcode, myParams, myJSONDataString, $debug) ;
// $resp=post($sessionInfo, myUsefullOpcode, myParams, myFileHandle, $debug) ;
// nicht vergessen!
logoff($sessionInfo, $debug);
} catch (Exception $e) {
echo 'Exception: '.$e->getMessage()." code: ".$e->getCode()."<br/>";
}
?></p>
</body>
</html> |
Page History
Overview
Content Tools