What are the alternatives for php: // input and $ HTTP_RAW_POST_DATA when file_get_contents and always_populate_raw_post_data are disabled

My host has disabled all socket functions except curl. They are so irresponsible on my questions to allow this. I can think of another hosting, but I want to know the following.

I asked a question related to this, and this is a continuation of another question.

I cannot use file_get_contents ('php: // input'), and always_populate_raw_post_data is disabled in php.ini, so I cannot use $ HTTP_RAW_POST_DATA.

So, what is or is there an alternative to getting the source data.

For example, I have a notification notification callback URL with facebook function. therefore, when there will ever be an event, facebook will send the information to my URL for a particular site.

so I need to read the source data from facebook and in accordance with the above description I want to find out alternatives for php: // input and $ HTTP_RAW_POST_DATA.

Is it possible to read the general content when some messages on my site, including the header, so that I can remove part of the header and use the body of the message?

yes ... we can get the full content when any authority publishes any content.

+4
source share
1 answer

When file_get_contents() disabled, you can use the excellent PEAR :: PHP_Compat functionality . It consists of replacing file_get_contents() .

Just download the latest package , extract it and use it as follows:

 require_once '/path/to/PHP_Compat-1.6.0a3/Compat/Function/file_get_contents.php'; $content = php_compat_file_get_contents('http://example.com'); 
+4
source

Source: https://habr.com/ru/post/1403896/


All Articles