string accounts[];
//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
string url = "https://example.com";
string headers = NULL;
char post[];
char result[];
string cookies = NULL;
int request_result = WebRequest("GET", url, cookies, headers, timeout, post, 0, result, headers);
if(request_result == -1)
{
Print("Error in WebRequest. Error code: ", GetLastError());
Alert("Add the address '" + url + "' in the list of allowed URLs on tab 'Expert Advisors'", " Error ", MB_ICONINFORMATION);
}
else
{
string response = CharArrayToString(result);
StringSplit(response, ',', accounts);
}
if(request_result != -1)
{
if(!CompareStringWithArray((string)AccountNumber(), accounts, ArraySize(accounts)))
{
Alert("Your license is expired.");
return(INIT_PARAMETERS_INCORRECT);
}
}
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Comparing strings with array |//+------------------------------------------------------------------+bool CompareStringWithArray(string str, string &string_array[], int array_size)
{
for(int i = 0; i < array_size; i++)
{
if(StringCompare(str, string_array[i]) == 0)
{
returntrue;
}
}
returnfalse;
}
Above is a snippit of an example code where an initial WebRequest for a website containing only lists of account numbers looking like:
,123,456,789,101,102,
My question is, and I cannot seem to find the answer for this: How long / how many data points is it possible for my code to retrieve? There are no "security" or any other data on this website other then the strings of account numbers seperated by an ',' (comma).
What are the limits for WebRequest? Is it unlimited? And therefore only limited by the string response and/or the char array results[]?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Above is a snippit of an example code where an initial WebRequest for a website containing only lists of account numbers looking like:
,123,456,789,101,102,
My question is, and I cannot seem to find the answer for this:
How long / how many data points is it possible for my code to retrieve?
There are no "security" or any other data on this website other then the strings of account numbers seperated by an ',' (comma).
What are the limits for WebRequest? Is it unlimited? And therefore only limited by the string response and/or the char array results[]?