Download MetaTrader 5

How to post a MULTI DIMENSIONAL array with WebRequest?

To add comments, please log in or register

Hi all , 

I hope you re all fine.

 I ve already used the native webrequest function to POST data.

Usually I post data using these lines below


char dataUpdatePost[]; 

char dataUpdateResult[];

string dataUpdateStr = "dataUpdateFlag=YES&orderNumber=" + orderNumber + "&profit=" + profit + "&profitPips=" + profitPips + "&cookie=" + sessionID;

ArrayResize(dataUpdatePost, StringToCharArray(dat[0,1], dataUpdatePost, 0, WHOLE_ARRAY, CP_UTF8) - 1);


int updateDataRes = WebRequest("POST", "", "", NULL, 1, dataUpdatePost, 0, dataUpdateResult, dataUpdateHeaders);


and it works fine ...

but this I would like to send an array like with some data inside that I will collect with a php webservice. 

string dat[3][10]; 

 Is there a way in MQL4 to send it via webrequest? 

 Thank you in advance.


To add comments, please log in or register