Download MetaTrader 5

HTTP Request Problem

To add comments, please log in or register
Have you published a program in the Market? Place it in your blog as well - the widget will help!
Nurudeen Amedu
41371
Nurudeen Amedu 2016.09.22 15:55 

I coded a HTTP request to get news figures from a webpage

it works properly and keeps updating for some time but when i leave it on my VPS over night, it stops updating the next day

until i place it on chart again then it updates

what could be the cause of this 

Marco vd Heijden
Moderator
4704
Marco vd Heijden 2016.09.22 15:59  
Nurudeen Amedu:

I coded a HTTP request to get news figures from a webpage

it works properly and keeps updating for some time but when i leave it on my VPS over night, it stops updating the next day

until i place it on chart again then it updates

what could be the cause of this 

5 Apples, 3 Oranges and a small coconut.

Maybe the connection fals into TIME_WAIT ?

Kaleem Haider
74857
Kaleem Haider 2016.09.22 16:02  
Marco vd Heijden:

5 Apples, 3 Oranges and a small coconut.

Maybe the connection fals into TIME_WAIT ?

hahahah. nice reply!

without seeing the code, its tough to tell.

Jose Francisco Casado Fernandez
2407
Jose Francisco Casado Fernandez 2016.09.23 06:43  
Nurudeen Amedu:

I coded a HTTP request to get news figures from a webpage

it works properly and keeps updating for some time but when i leave it on my VPS over night, it stops updating the next day

until i place it on chart again then it updates

what could be the cause of this 

Did you use wininet.dll or built-in WebRequest function???.  I experienced the same problem on my VPS using a wininet wrapper library (while it was working fine on my personal PC with the same code), and I fixed it by using WebRequest function.

It was something related to managing port change to ssl on the website (from port 80 to port 443). WebRequest contemplates both cases and it works perfectly.


I hope it helps you. Regards.

To add comments, please log in or register