https://www.icyphoenix.com/viewtopic.php?f=28&t=2125&p=39552#p39552
-----------------------------------
darkasylum
Wed 20 May, 2009 20:02

Re: Forum Integrated News Delivery Fopen
-----------------------------------
looks like my host have closed fopen on there servers ! is there any way around this?
or can give me host that does ?

see there reply below!

I checked your issue in detail. In our server allow_url_fopen is disabled. If enabled, allow_url_fopen allows PHP's file functions such as file_get_contents() and the include and require statements can retrieve data from remote locations, like an FTP or web site. Programmers frequently forget this and don't do proper input filtering when passing user-provided data to these functions, opening them up to code injection vulnerabilities. A large number of code injection vulnerabilities reported in PHP-based web applications are caused by the combination of enabling allow_url_fopen and bad input filtering.


This is the reason why rss feed is not included. Many developers include files by pointing to a remote URL, even if the file is within the local system. For example:

php include("http://example.com/includes/example_include.php");

With allow_url_fopen disabled, this method will not work. Instead, the file must be included with a local path, and there are three methods of doing this:

1. By using a relative path, such as ../includes/example_include.php.
2. By using an absolute path (also known as relative-from-root), such as /home/username/example.com/includes/example_include.php.
3. By using the PHP environment variable $_SERVER['DOCUMENT_ROOT'], which returns the absolute path to the web root directory. This is by far the best (and most portable) solution. The example that follows shows the environment variable in action: 

If you have any issues or queries, please feel free to contact us.


