int HttpOpen=InternetOpenW(iAg,0," "," ",0);
- Check your return codes. Not at the bottom but right there. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
- Do you really expect anything but 404 with the URL: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)
- Why don't you use the built in WebRequest - MQL4 Documentation
- Check your return codes. Not at the bottom but right there. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
- Do you really expect anything but 404 with the URL: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)
- Why don't you use the built in WebRequest - MQL4 Documentation
add 1: I do check the Windows return code of all of my internet call (I skipped them here) they are all the time 0 = no error. But this way I found this error: ERROR_HHTP_HEADER_NOT_FOUND caused by "0"
add 2: I normally tried just " " as agent it makes no difference!
add 3: a) I haven't thought of it. b) I couldn't imagine why the old code should stop working? c) Do we have to re-write all our codes after every update?
c) your suggestion isn't better at all:
string GrabWeb2(string strUrl, string rawFile, int debug=0) {//>4 string cookie=NULL,headers; char post[],result[]; int res, timeout=5000; strUrl = "http://www.server4you.de/vserver/"; res=WebRequest("GET",strUrl,cookie,NULL,timeout,post,0,result,headers); if (res < 0) { Alert("Error in WebRequest. Error code =",GetLastError()," = 4060 ERR_FUNCTION_NOT_CONFIRMED" ); return(""); } string ret = CharArrayToString(result,0,-1); return(ret); }
res becomes -1 and the error code is 4060 =
4060 |
ERR_FUNCTION_NOT_CONFIRMED |
Function is not allowed for call |
What to do?
4060 | ERR_FUNCTION_NOT_CONFIRMED | Function is not allowed forcall |
You have two different problems. The error #4060 means that the URL is not on the "Allow WebRequest..." list in MT4's Tools / Options. It will be unrelated to the earlier problem using WinInet.
You are right, but from my viewpoint none of the mt4 options to load an internet page works.
I wont it work - no matter how!
You are right, but from my viewpoint none of the mt4 options to load an internet page works.
I wont it work - no matter how!
Retrieval of http://www.forexfactory.com/ffcal_week_this.xml works for me using WebRequest provided that the URL is added to the list in Tools / Options.
And your GrabWeb() code from https://forum.mql4.com/62321#941970 also works for me.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
since the last terminal update to 890 I do have several problems.
A serious one is that my tries to load the new-file of the week fails:
BTW the older version
with "0" causes this error ERROR_HHTP_HEADER_NOT_FOUND. Now use NULL.
But even without this problem I get only the 404 Page not Found.
Anybody with an idea what to do?