<?php
class Pixel {
public $orderDateTime;
public $domain;
public $publId;
public $privId;
}
class PixelHandling extends SoapClient{
// Client connection
private $clientopts = array('login' => 'SlevogtE', 'password' => 'BBDEXI', 'trace' => 1);
private $wsdl = 'https://' . $clientopts['login'] . ':' . $clientopts['password'] . '@tom-test.vgwort.de/services/1.0/pixelService.wsdl' ;
private $client;
function __construct(){
$this->client = new SoapClient($wsdl, $clientopts);
}
// Order Pixel (amount) --> pixels will be written to array $pixels
public function orderNewPixel($amount){
$params = new StdClass();
$params->count = $amount;
$arr = array();
try{
$result = $this->client->orderPixel($params);
foreach($result as $val){
$pixels = new Pixel();
$pixels->orderDateTime = $val->orderDateTime;
$pixels->domain = $val->domain;
$pixels->publId = $val->pixels->publicIdentificationId;
$pixels->privId = $val->pixels->privateIdentificationId;
array_push($arr, $pixels);
}
}
catch(SoapFault $e){
echo "Fehlercode: ", $result->errorcode, "\n";
echo "Message: ", $result->errormsg, "\n";
echo "Folgende Anzahl waere moeglich gewesen: ", $result->maxOrder, "\n";
}
return $arr;
}
}
// Check whether Soap can be even used..
if(!class_exists('SoapClient')){
echo '<script type="text/javascript" language="Javascript">alert("Fehler: PHP-Modul fehlt.")</script>';
}
$test = new PixelHandling();
$test->orderNewPixel(2);
// Format für Pixel export
// <IMG src="domain.met.vgwort.de/na/c5b7568d28884052a9ff92d5afd08f34"
// height="1" width="1" border=“0“>
?>
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected '.', expecting ',' or ';' in /in/Rrbhd on line 16
Process exited with code 255.
preferences:
203.8 ms | 1395 KiB | 65 Q