$url, CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 4 ); //create a new cURL resource $ch = curl_init(); curl_setopt_array($ch, $defaults); // grab URL and pass it to the browser $result = curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); if ($result) { echo Display::return_icon('check-circle.png', get_lang('Ok'), null, ICON_SIZE_TINY); } else { echo Display::return_icon('closed-circle.png', get_lang('Wrong'), null, ICON_SIZE_TINY); } } break; default: echo ''; } exit;