2010-11-03, 01:05:26
Administrators can disable file_get_contents() outside of the server, that’s very possible. It depends on the fopen wrapper setting. Don’t ask me what the security concerns were though. I can’t recall.
If you want to use it inside your plugin you will probably need to do something like this:
If you want to use it inside your plugin you will probably need to do something like this:
Code:
if ((bool)ini_get('allow_url_fopen')) {
// use fopen
} elseif (in_array('curl',get_loaded_extensions())) {
// use cURL
} else {
// server has no way to get external file
}
“Don’t forget the important ˚ (not °) on the a,†says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!