allow_url_fopen is a function which has some useful functionality. This function allows a website script to get contents from a different website. There are certain scenarios when you may need this php function to be enabled, but not all websites require it.
Enabling or using allow_url_fopen incorrectly can be risky for site security, so it is best not to enable it if you do not really need it or can program the website with some other function to achieve the same result.
While do allow direct changes to PHP.ini on your hosting account, to enable allow_url fopen on your cPanel, you will need to do the following:
1) First, Log into cPanel.
2) Click on the “Select PHP version” from the SOFTWARE section
3) After that, click if your PHP version is native (7.2) (current) then change it to a specific version from the drop down menu as shown below.
N.B: If you saw PHP version is not selected as native, then directly go to the next step.
4) Now click the options menu & check the blank box which is beside the allow_url_fopen, then you see a successful notification on top of the right side in windows. The allow_url_fopen function is now successfully enabled.
Note: Your website php version must be selected using PHP selector, not MultiPHP manager for this process to work. Please follow this guide for more information.