首页 > 解决方案 > MQL4/5 如何使用 PHP 与代理建立连接(登录)

问题描述

我正在用 php 创建网站,该网站将存储用户帐号、密码和经纪人名称 (ip),该帐户将在用户将数据保存在数据库中的同时自动连接到 MQL4/5 软件。

我现在遇到的问题是用户可以保存无效数据,这将导致与 MQL4/5 的无效连接,我想在连接前检查它以确保所有数据都是有效的。

有什么方法可以使用 php 或 js 连接到代理,并在将凭据存储到数据库之前检查凭据是否正确(帐号和密码)?

提前致谢。

标签: phpmql

解决方案


Yes, but it's not easy.

You can only authenticate with a broker's Metatrader server using a Metatrader client terminal.

That being said, you could launch a Metatrader web-terminal in a headless selenium instance, login using the supplied credentials, and check the authentication result from the resulting html.

enter image description here


推荐阅读