<?php

define("PATH_TO_SCRIPTS", "mt5_api/");
include PATH_TO_SCRIPTS . "mt5_api.php";


define("MT5_SERVER_IP", "access.tgshost.org");
define("MT5_SERVER_PORT", "26043");
define("MT5_SERVER_WEB_LOGIN", "7020");
define("MT5_SERVER_WEB_PASSWORD", "Aa@123456");

define("MT5_CRYPT_PROTOCOL", true);
define("IS_WRITE_DEBUG_LOG", true);
define("MT5_CONNECTION_TIMEOUT", 3);
define("PATH_TO_LOGS", "./logs");
define("AGENT", "WebAPITesterArt");

$api = new MTWebAPI(AGENT, PATH_TO_LOGS, MT5_CRYPT_PROTOCOL);
$api->SetLoggerWriteDebug(IS_WRITE_DEBUG_LOG);


    // mt5 manager  connection

    if (($error_code = $api->Connect(MT5_SERVER_IP, MT5_SERVER_PORT, MT5_CONNECTION_TIMEOUT, MT5_SERVER_WEB_LOGIN, MT5_SERVER_WEB_PASSWORD)) != MTRetCode::MT_RET_OK) {
   
    echo "<script>alert('Invalid Details');</script>";
    
    } 
    
    
?>