string cookie=NULL,headers; char post[],result[]; string url="http://www.dailyfx.com/files/Calendar-05-14-2017.csv"; int res=WebRequest("GET",url,cookie,NULL,10000,post,0,result,headers); if(res==-1) { Print("Error in WebRequest. Error code =",GetLastError()); } else { PrintFormat("The file has been successfully loaded, File size =%d bytes.",ArraySize(result)); }
Error in WebRequest. Error code =5203
I stopped the use of WebRequest and use PowerShell, wget and the TaskScheduler to load and parse such files as I can dld them e.g. Sunday at 20:00 GMT and I don't have to wait for the first tick..
lol...you like simplicity.
lol...you like simplicity.
It's more than just simplicity!
- It works independently from any troubles with mt4/5, broker, connection, ticks..
- Some news-server may get into troubles if all around the world try to access the same address at the same tiny moment (the first tick)..
- I find parsing with PowerShell is easier than with mql4, e.g. remove html-tags..
- With wget I am more flexible and I have more options for the download
At least it works.
It's more than just simplicity!
1. It works independently from any troubles with mt4/5, broker, connection, ticks..
Wrong argumentation, you can have problems with any software and you are always depending of some external conditions. There are no special issue to use WebRequest with MT4/MT5.
2. Some news-server may get into troubles if all around the world try to access the same address at the same tiny moment (the first tick)..
How is it related to the discussion ? It's server side.
3. I find parsing with PowerShell is easier than with mql4, e.g. remove html-tags..
Completely subjective. mql4/mql5 has all possibilities to code anything. Certainly html processing.
4. With wget I am more flexible and I have more options for the download
For sure wget is more powerful than WebRequest. More options, more stability, etc...That's a 20 years old software with a very wide usage, community, etc. But if we talk about HTTP/HTTPS request which are common with WebRequest, what can you do with wget you can't do with WebRequest and mql ?
There are no special issue to use WebRequest with MT4/MT5.
[...]
what can you do with wget you can't do with WebRequest and mql ?
One example: you can't use WebRequest in an indicator.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need to open an URL and download a file from URL. Standard functions, such as InternetOpenUrlW, and native Windows libraries, are using Internet Explorer, but I need to get access to file without Internet Explorer. Moreover, this particular page does not open through IE (but open in different browsers), but it does not matter.
WebRequest does not work too.