Edit Your Comment
Using API myfxbook from MQL
เป็นสมาชิกตั้งแต่ Jan 31, 2013
1 โพสต์
Jun 08, 2015 at 15:00
เป็นสมาชิกตั้งแต่ Jan 31, 2013
1 โพสต์
Hi!
Help please how correctly to make login from MQL to myfxbook through WebRequest.
// .........................
string headers;
char post [], result [];
StringToCharArray ("[email protected]&password=123456", post); // Must specify string length; otherwise array has terminating null character in it
int res = WebRequest ("POST", "https://www.myfxbook.com/api/login.json", "", NULL, 10000, post, ArraySize (post), result, headers);
Print ("Status code:", res, ", error:", GetLastError ());
Print ("Server response:", CharArrayToString (result));
// ..............................
Result:
Status code: -1, error: 5203
Server response: send request failed [2148074278]
WebRequest to sites http://www.myfxbook.com and https://www.myfxbook.com/ in MT4 allowed
Thank you.
Help please how correctly to make login from MQL to myfxbook through WebRequest.
// .........................
string headers;
char post [], result [];
StringToCharArray ("[email protected]&password=123456", post); // Must specify string length; otherwise array has terminating null character in it
int res = WebRequest ("POST", "https://www.myfxbook.com/api/login.json", "", NULL, 10000, post, ArraySize (post), result, headers);
Print ("Status code:", res, ", error:", GetLastError ());
Print ("Server response:", CharArrayToString (result));
// ..............................
Result:
Status code: -1, error: 5203
Server response: send request failed [2148074278]
WebRequest to sites http://www.myfxbook.com and https://www.myfxbook.com/ in MT4 allowed
Thank you.
เป็นสมาชิกตั้งแต่ Aug 27, 2015
1 โพสต์
เป็นสมาชิกตั้งแต่ Mar 14, 2014
1 โพสต์
Mar 18, 2016 at 07:10
เป็นสมาชิกตั้งแต่ Mar 14, 2014
1 โพสต์
int result = WebRequest("GET", "https://www.myfxbook.com/api/login.json", NULL, NULL, Timeout, post, 0, result, resultHeaders);

*การใช้งานเชิงพาณิชย์และสแปมจะไม่ได้รับการยอมรับ และอาจส่งผลให้บัญชีถูกยกเลิก
เคล็ดลับ: การโพสต์รูปภาพ/youtube url จะฝังลงในโพสต์ของคุณโดยอัตโนมัติ!
เคล็ดลับ: พิมพ์เครื่องหมาย @ เพื่อป้อนชื่อผู้ใช้ที่เข้าร่วมการสนทนานี้โดยอัตโนมัติ