
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to migrate my EA to a virtual server provided by mql5(hosted by webzilla). It uses webrequest to get crucial information from a website(code below). This works perfect on my local machine, but on the server I get Error 4014(ERR_FUNCTION_NOT_ALLOWED).
Does anyone have an Idea on why it does not work and how to fix it?
further information: res is -1 after the WebRequest call and GetLastError returns 4014 as mentioned above
string getHtml(string url)
{
//get the html website;
string cookie=NULL,headers, html;
char post[],result[];
int res;
int timeout=5000;
ResetLastError();
res=WebRequest("GET",url,cookie,NULL,timeout,post,0,result,headers);
if(res==-1)
{
printf("ERROR: %d", GetLastError());
printf("Make sure website is listed in allowed urls in EA in options");
return "";
}
PrintFormat("Loaded File, size =%d bytes.",ArraySize(result));
html=CharArrayToString(result,0,WHOLE_ARRAY,CP_ACP);
return html;