A connection with the server... is a network problem, was: InternetOpenURL

To automatically read some data, I used the function for a long time

ih = InternetOpenURL( https://ycharts.com/indicators/us_recession_probability );

Maybe they changed something on the ycharts.com site because as of today, the function return me an error:
image

But if I try to open the link in a browser, it works.
Can anyone point me to a possible solution?
If I use the function to call other sites, it renders no error
I restarted the PC
I use a windows server and I have an
image

It works for me.

ih = InternetOpenURL( "https://ycharts.com/indicators/us_recession_probability" ); 
if( ih ) 
 { 
      while( ( str = InternetReadString( ih ) ) != "" ) 
      { 
          printf( "%s", str ); 
      } 
      InternetClose( ih ); 
 } 

Can you kindly tell me which version of Amibroker you have?

It is NOT a problem with InternetOpenURL. It has nothing to do with AmiBroker. It is also not the problem with the web site, if you can connect from the browser.

It is your NETWORK and/or FIREWALL / ANTIVIRUS problem.

Firewalls and antiviruses are reason of 99% of problems. They randomly do the damage and block things without warning.

Google is your friend:

https://www.google.com/search?q=a+connection+with+the+server+could+not+be+established

On a sidenote, here is what ChatGPT would tell you:

There are several possible reasons why you might be seeing an error message saying that a connection with the server could not be established. Here are a few things you can try:

  1. Check your internet connection: Make sure that your device is connected to the internet and that your internet connection is stable
  2. Check the website's status: The website you are trying to access may be down or experiencing technical difficulties. You can check the website's status by using a service like DownDetector or by contacting the website's administrator.
  3. Check your firewall or antivirus software: Your firewall or antivirus software may be blocking the connection. Try temporarily disabling these programs to see if that resolves the issue.
  4. Check your network settings: There may be a problem with your network settings that is preventing the connection. You can try resetting your network settings or contacting your internet service provider for assistance.
  5. Check the URL: Make sure that you have entered the correct URL and that you are using the correct protocol (e.g., "http://" or "https://").

    If you have tried all of these steps and are still having trouble connecting to the server, it is possible that there is a problem with the server itself. In this case, you may need to contact the website's administrator for further assistance.

Dear Tomasz
thanks for the hint but I need some more clues to figure it out.

I turned off the local firewall

If I try to open the link in my browser, it opens

Ok , it could be a firewall problem but why does it only affect the Amibroker software ?
and it doesn't affect the browser ?

An antivirus is not present on the PC where Amibroker runs

if they banned my public ip, the browser shouldn't work either

Finally, the same syntax, the same command, to another site works

any guidance on how to fix the problem is greatly appreciated
thank you

Because firewalls have RULES that are separate for each executable. You can block each and every program SEPARATELY.

InternetOpenURL is Windows API function (WINET subsystem), see:

It is straight call to it. The entire thing is handled by Windows, not AmiBroker. Please note that some browsers don't use Windows WINET API. You should use Internet Explorer to have reliable checks of whenever WINET API works.

If anyone enters the same problem, i managed to fix it this way
I had to switch operating systems by scaling up

Then, following these instructions,
Disable Enhanced Security in Internet Explorer
thanks to the awareness provided by Tomasz that Amibroker uses WINET API, I reduced the security of Internet Explorer (which I don't use to surf the net).

Thanks for your help