Script to test the correct functioning of Fopen and Curl

0

I need help to get a script to check the proper functioning of Fopen and Curl.

This is a problem which I have no knowledge to check if it is working, although I do not have total control over the hosting systems.

It is a point to present, although when we need to make a diagnosis on the fly it is not possible to track the problem which would not be resolved.

    
asked by Juan Manuel Pedro Villalba 19.12.2016 в 20:31
source

1 answer

1

PHP offers you several ways to carry out your goal:

function-exists

if (function_exists('curl_init') !== false) {
  echo "CURL funcional";
} else {
  echo "CURL no funcional";
}

get_loaded_extensions

if (in_array('curl', get_loaded_extensions()) !== false) {
  echo "CURL cargado";
} else {
  echo "CURL no cargado";
}
    
answered by 19.12.2016 / 21:31
source