MT4 PHP first steps

easy direct connection to any MT4 and MT5 server

MT4 PHP first steps

Download PHP demo zip.
1. Open runAPI.cmd and specify path to java.exe
2. Start runAPI.cmd.
4. In opened windows choose port(8080 by default) and press OK.
3. Open runPHP.cmd and specify path to php.exe
4. Open php.ini and add: allow_url_include = On
5. Open test.php ans specify port(8080 by default) chosen at point 4.
5. Start runPHP.cmd
6. You should see output with account balance.

<?php

require_once("http://localhost:8080/JavaBridge/java/Java.inc");
$qc = new java("online.mtapi.mt4.QuoteClient", 55967934, "ov2osqv""88.212.244.84", 1951);
$qc->Connect();
echo "AccountBalanc =  ".$qc->AccountBalance();
$qc->Disconnect();
$line = fgets(fopen ("php://stdin","r"));
?>

Leave a Reply