Scripts: WININET_TEST - page 2

 
fjccpm:
I found that wininet worked before the last MT5 update. But I still cant find a solution to make it work again. please let me know if you find how to overcome this problem.
https://www.mql5.com/en/forum/999#comment_152810
 

Hi,

Problem with MT version 5 Build 730.

TerminalInfoInteger(TERMINAL_DLLS_ALLOWED) return false even if I check Allow Dll Import. If I comment this part, the next code work correctly.

Any idea?

 

Wonderful code!

But, since you have figured out these functions, could you tell me how to get just a function returning a string instead of writing to a file?

I can't understand these arrays yet....

 
Eugene1:

Wonderful code!

But, since you have figured out these functions, could you tell me how to get just a function returning a string instead of writing to a file?

I can't understand these arrays yet....

Here the script stuffs the received data into a string with identifier s:

for(int k=0;k<BufLen;k++) { s=s+CharToString(buf0[k]);}
 
This is no longer relevant. There is now a standard webrequest function
Документация по MQL5: Общие функции / WebRequest
Документация по MQL5: Общие функции / WebRequest
  • www.mql5.com
Общие функции / WebRequest - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Reshetov:

Here is where the script stuffs the received data into a string with identifier s:

Thanks Reshetov!

Just what I need.

The standard function doesn't work for me, because I load the page from the indicator.

 
Reshetov:

Here the script stuffs the received data into a string with identifier s:

I'm getting something wrong. A set of numbers instead of html

   while(!IsStopped())
     {
      bool bResult=InternetReadFile(hURL,buffer,1024,dwBytesRead);
      cnt+=dwBytesRead[0];
      if(dwBytesRead[0]==0) break;
      FileWriteArray(h,buffer,0,dwBytesRead[0]);
      for(int i=0; i < dwBytesRead[0]; i++) {
         content = StringConcatenate(content, buffer[i]);
      }
     }
 

Guys, What's the problem and solution for this error?

"Error in call of HttpQueryInfoW()

Content length is unknown"

 
lycenet #:

Guys, What's the problem and solution for this error?

"Error in call of HttpQueryInfoW()

Content length is unknown"

The exact errors occur in my computer.