添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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:

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

It works for me.

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

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:

  • Check your internet connection: Make sure that your device is connected to the internet and that your internet connection is stable
  • 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.
  • 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.
  • 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.
  • 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

    flaviog2005:

    it could be a firewall problem but why does it only affect the Amibroker software ?

    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:

    learn.microsoft.com

    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