Download MetaTrader 5
To add comments, please log in or register
Freelance service: the safe way to order a trading robot. Try it!
Mohammad Ali
18087
Mohammad Ali 2014.09.29 05:45 

Dear,

I am using WebRequest. and want to get return value:

 

 _url = _url+"?message="+Message;
   
//--- load html page from URL
   res=WebRequest("GET", _url,cookie,NULL,50,post,0,result,headers);
//--- check errors

   if(res==-1)
     {
      Print("Error code =",GetLastError());
      ReturnValue=0;
     }
   else
     {
      
      int filehandle=FileOpen("GoogleFinance.htm",FILE_WRITE|FILE_BIN);
      //--- check
      if(filehandle!=INVALID_HANDLE)
        {
         //--- write result[] array to file
         FileWriteArray(filehandle,result,0,ArraySize(result));
         //--- close file
         FileClose(filehandle);
        }
      
      ReturnValue = result[0];
     }

 

 

 My webpage only show number no HTML  and number is 1, -2 , 0 like that. In this number i will understand data will get in webpage successfully or not. it is just custom error code.

 But above code will see i got result only in htm page. i don't want save result on any file only get result . but result[0] only show number. example my webpage return text is 1 but result[0] show 96 

My question is how i get return in text without saving any time. 

 

Thanks 

Alain Verleyen
Moderator
28524
Alain Verleyen 2014.09.29 13:40  
printf("RESULT=%s",CharArrayToString(result));
/
To add comments, please log in or register