Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/admin/gls-sticker.php
<?php if(isset($_GET['numer'])){
$hClient = new SoapClient( 'https://adeplus.gls-poland.com/adeplus/pm1/ade_webapi2.php?wsdl' ); 
   
$oCredit = new stdClass();
$oCredit->user_name = '54002596.api';
$oCredit->user_password = '14qbW@Qb';    
     
$oClient = $hClient->adeLogin( $oCredit ); 
$szSession = $oClient->return->session;

$oSess = new stdClass();
$oSess->session = $szSession;
$oClient = $hClient->adeProfile_GetIDs( $oSess );   

	$tablicaProfila= new stdClass();
	$tablicaProfila->session=$szSession;
	$tablicaProfila->id='45832';
    $aktualnyProfil=$hClient->adeProfile_Change($tablicaProfila);

$oInput = new stdClass();
$oInput->session = $szSession;  
$oInput->id = $_GET['numer'];
$oInput->mode = 'roll_160x100_pdf';
$oClient = $hClient->adePreparingBox_GetConsignLabels( $oInput );      
$szLabels = base64_decode( $oClient->return->labels );

$naklejka_encode=base64_decode($szLabels);
//echo $oClient->return->labels .'<br><br>';
//echo $szLabels.'<br><br>';
//echo $naklejka_encode .'<br><br>';


header('Content-type: application/pdf');
                              header('Content-Disposition: attachment; filename=nr'.$_GET['numer'].'.pdf');
                              echo $szLabels;
}
?>