i test the WebRequest() function on some public domains,such as www.google.com www.mql5.com works very well.
but when i use it on LocalHost domians,it doesn't work anymore.
i did add localhost domain in the EA tab of option menn.
doesn't work,any other solutions?
thanks for your reply
I can't see a problem using localhost. The following works fine for me:
char arrPost, arrResult;
int res = WebRequest("GET", "http://localhost/test.htm", NULL, NULL, 10000, arrPost, 0, arrResult, strResponseHeaders);
Print("Result: ", res, ", error: " , GetLastError());
Of course i have a web server running,and the browser can get the page on localhost fine.
i got the page,but metatrader runtime failed.
should i use port 80?
I know the answer now.
Only Port 80 and 433 is allowed.
i think the document should mentioned this.
To add comments, please log in or register