PHP cURL cannot resolve script.google.com

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

No, InfinityFree doesn’t support requests to script.google.com. Google Apps Script is on our list of blocked services, so your site can’t reach it. That’s why the lookup fails.

The knowledge base article says blocked services may not resolve at all. You get a host name error like the “Could not resolve host” you’re seeing, and gethostbyname() returns the name unchanged. Your browser test works because the block only applies to connections made from our hosting servers.

The article’s advice is to use an alternative service, or to upgrade to premium hosting if you need access to Google Apps Script. For email, it says you can send through an external SMTP server on port 587 with STARTTLS (tls encryption). Port 465 won’t work. Here’s the article: