forked from ZwiiCMS-Team/ZwiiCMS
093 helper pour Free
This commit is contained in:
parent
1934ef4ef0
commit
a2195dc572
@ -24,12 +24,14 @@ class helper {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static function urlGetContents ($url) {
|
public static function urlGetContents ($url) {
|
||||||
if(function_exists('file_get_contents') and
|
if(function_exists('file_get_contents') &&
|
||||||
ini_get('allow_url_fopen') ){
|
ini_get('allow_url_fopen') &&
|
||||||
|
is_readable($url) ){
|
||||||
$url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel
|
$url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel
|
||||||
}elseif(function_exists('fopen') &&
|
}elseif(function_exists('fopen') &&
|
||||||
function_exists('stream_get_contents' &&
|
function_exists('stream_get_contents') &&
|
||||||
ini_get('allow_url_fopen') )){
|
ini_get('allow_url_fopen') &&
|
||||||
|
is_readable($url) ){
|
||||||
$handle = fopen ($url, "r");
|
$handle = fopen ($url, "r");
|
||||||
$url_get_contents_data = stream_get_contents($handle);
|
$url_get_contents_data = stream_get_contents($handle);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user