Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/admin/kurierinpost/index.php
<?php
/**
 * Test with InpostCourier for 'https://api-kurier.inpost.pl/api/api.asmx?WSDL'
 * @package InpostCourier
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20150429-01
 * @date 2016-10-02
 */
ini_set('memory_limit','512M');
ini_set('display_errors',true);
error_reporting(-1);
/**
 * Load autoload
 */
require_once dirname(__FILE__) . '/InpostCourierAutoload.php';
/**
 * Wsdl instanciation infos. By default, nothing has to be set.
 * If you wish to override the SoapClient's options, please refer to the sample below.
 * 
 * This is an associative array as:
 * - the key must be a InpostCourierWsdlClass constant beginning with WSDL_
 * - the value must be the corresponding key value
 * Each option matches the {@link http://www.php.net/manual/en/soapclient.soapclient.php} options
 * 
 * Here is below an example of how you can set the array:
 * $wsdl = array();
 * $wsdl[InpostCourierWsdlClass::WSDL_URL] = 'https://api-kurier.inpost.pl/api/api.asmx?WSDL';
 * $wsdl[InpostCourierWsdlClass::WSDL_CACHE_WSDL] = WSDL_CACHE_NONE;
 * $wsdl[InpostCourierWsdlClass::WSDL_TRACE] = true;
 * $wsdl[InpostCourierWsdlClass::WSDL_LOGIN] = 'myLogin';
 * $wsdl[InpostCourierWsdlClass::WSDL_PASSWD] = '**********';
 * etc....
 * Then instantiate the Service class as: 
 * - $wsdlObject = new InpostCourierWsdlClass($wsdl);
 */
/**
 * Examples
 */

$wsdl[InpostCourierWsdlClass::WSDL_URL] = 'https://api-kurier.inpost.pl/api/api.asmx?WSDL';
$wsdl[InpostCourierWsdlClass::WSDL_CACHE_WSDL] = WSDL_CACHE_NONE;
$wsdl[InpostCourierWsdlClass::WSDL_TRACE] = true;
$wsdl[InpostCourierWsdlClass::WSDL_LOGIN] = 'allegro@prolabel.pl';
$wsdl[InpostCourierWsdlClass::WSDL_PASSWD] = 'prolabel';
$wsdlObject = new InpostCourierWsdlClass($wsdl);
echo '<pre>';
 
$inpostCourierServiceCreate = new InpostCourierServiceCreate();
if($inpostCourierServiceCreate->CreateShipment(new InpostCourierStructCreateShipment()))
    print_r($inpostCourierServiceCreate->getResult());
else
    print_r($inpostCourierServiceCreate->getLastError());
 
echo '</pre>'; 
 ?>