<?php
include "sapb1.phar"; 
use SAPb1\SAPClient;

try {
    $sap = Null;
    function Login() {
 

        $config = [
            "https" => true,
            "host" => "192.168.1.50",
            "port" => 50000,
            "sslOptions" => [
                //"cafile" => "C:\Program Files\SAP\SAP Business One ServerTools\ServiceLayer\Conf\server.crt",                                               
                "verify_peer" => false,
                "verify_peer_name" => false,
            ],
            "version" => 1
        ];
        $sap = SAPClient::createSession($config, "manager", "bpsmaroc", "TestInOut");
        return $sap;
    } 


} catch (Exception $e) {
    echo $e->getMessage();    
}
?>