File_get_contents() not working properly

I’m asking regarding the IFTWC account, the php code has a file_get_contents function that is used to send data using the get request of Telegram API, it is used to send a message, the same code is working on localhost, but not on this hosting? can you help me please? All the data is correct, code works perfectly on localhost using xampp, I also tried doing it using file() but that doesn’t work either… cUrl doesn’t work either…

Hi,
Back when my Infinityfree accounts weren’t suspended (they just were this morning, I’m working on it right now), my php file get contents worked just fine. A few things to note: to use file get contents the file has to be on the same domain as the PHP file you are running the command in, and the file extension has to be .php, not .html. Lastly, make sure you are not formating your file with if commands that won’t run.
Cobbsaladluv

Chat scripts do not work here…

1 Like

Access to the Telegram APIs is blocked due to abuse. Way too many people were using them for spam scripts, so we had no other option than to block it.

3 Likes

Hi,
I doubt that that’s a reason:

  1. file_get_contents doesn’t need to be on a same domain. It works perfectly with any API that uses GET requests and you don’t need to change headers etc…and
  2. it works with any file, literally anything accessible on the internet that doesn’t give a 500 or 404 error, even TXTs or a photo can be received

As admin said earlier, the APIs are blocked which is the reason. I have a file_get_contents which works perfectly and isn’t even on the same hosting as this

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.