Discussion of article "Using WinInet.dll for Data Exchange between Terminals via the Internet" - page 4

 
OK, I have changed my mind. This object is worth of try because these sick morons from MetaQuotes forbid using WebRequest function in Strategy Tester.
 

managed to run on mt5 x64 (metagrabber script worked without errors)

code changes in internetlib.mqh class ::reqest

// create a request descriptor
   string null = NULL;
   hRequest=HttpOpenRequestW(Connect,Verb,Object,Vers,nill,null,FLAG_KEEP_CONNECTION|FLAG_RELOAD|FLAG_PRAGMA_NOCACHE,0);
 

But I understand that the request from the Internet cannot be used in Market products, because dlls are forbidden there.

and there is no other way to use #import "wininet.dll" without the dll itself ?

 
Yurij Izyumov:

But I understand that the request from the Internet cannot be used in Market products, because dlls are forbidden there.

and there is no other way to use #import "wininet.dll" without the dll itself ?

There is WebRequest for a long time already, it is allowed in the Market.
 

In the code below, I've replaced the URL variable with path, because URL is an external variable to the ParseURL function:

void ParseURL(string path,string &host,string &request,string &filename)

{

host=StringSubstr(path,7);

// remove

int i=StringFind(host,"/");

request=StringSubstr(host,i);

host=StringSubstr(host,0,i);

string file="";

for(i=StringLen(path)-1; i>=0; i--)

if(StringSubstr(path,i,1)=="/")

{

file=StringSubstr(path,i+1);

break;

}

if(file!="") filename=file;

}

 

Good evening!

I used XAMPP to install php and apache. However, I can't access the page via GET from MQL5.

Below is the error returned:

Access forbidden!

You don't have permission to access the requested object.

It is either read-protected or not readable by the server.

Does anyone know how to solve this problem?
 
Andrey Khatimlianskii:
There is WebRequest for a long time already, it is allowed in the market.

There are already problems with it in the market (access is closed on mcl5) and it doesn't work in indicators....

 
Vladimir Pastushak:

Already in the market there are problems with it (access is closed on µl5) and it doesn't work in indicators...

WebRequest has never worked in indicators. The reason for the refusal is not clear, because the developer can decide when writing a programme whether to use WebRequest or not. We make it out in the 21st century WinInet.dll
 
Vladimir Pastushak:

Already in the mart there are problems with it (on mcl5 access is closed) and it doesn't work in indicators...

What problems in the market?

And why access on µl5?


Vitaly Muzichenko:
WebRequest has never worked in indicators. The reason for refusal is not clear, because the developer can decide when writing a programme whether to use WebRequest or not. We make it out in the 21st century WinInet.dll

The reason is very simple - indicators work in the interface thread, and any pause will suspend the whole chart. And nobody can guarantee instantaneous execution of a web-request.

Probably, you can make a special mode similar to CopyRates, when the first call simply requests data, and subsequent calls use it. But I don't think that MQ will make such a crutch for web-request, we'll have to invent it ourselves (by launching a script or something else).

 
Andrey Khatimlianskii:

What are the problems in the marketplace?

And why access on µl5?


The reason is very simple - indicators work in the interface thread, and any pause will suspend the whole chart. And nobody can guarantee instantaneous execution of a web-request.

Probably, you can make a special mode similar to CopyRates, when the first call simply requests data, and subsequent calls use it. But I don't think MQ will make such a crutch for web-request, we'll have to come up with it ourselves (via running a script or something else).

Let it suspend the schedule at runtime, what's the problem? I repeat:"the developer himself can decide when writing a programme whether to use WebRequest or not".