phpcode Posted September 20, 2007 Share Posted September 20, 2007 Is it possible to check if curl and file_get_contents are enabled and showing if they are on a web page? Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/ Share on other sites More sharing options...
Jessica Posted September 20, 2007 Share Posted September 20, 2007 you can use function_exists for the file_get_contents, I guess you could do the same on curl_exec or something. Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/#findComment-351651 Share on other sites More sharing options...
cooldude832 Posted September 20, 2007 Share Posted September 20, 2007 also the classic php_info(); is a great way to get all the info you ever could want/need/ Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/#findComment-351655 Share on other sites More sharing options...
NArc0t1c Posted September 20, 2007 Share Posted September 20, 2007 Example: <?php echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled' . '<br /> file_get_contents: ', file_get_contents(__FILE__) ? 'Enabled' : 'Disabled'; ?> Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/#findComment-351659 Share on other sites More sharing options...
phpcode Posted September 21, 2007 Author Share Posted September 21, 2007 Thanks 1 more question, is there a way to check if file_get_contents can connect to other websites? Because it's saying enabled even though it can't connect to a site like google. Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/#findComment-352070 Share on other sites More sharing options...
trq Posted September 21, 2007 Share Posted September 21, 2007 <?php echo ini_get('allow_url_fopen') ? "Enabled" : "Disabled"; ?> Link to comment https://forums.phpfreaks.com/topic/70017-solved-check-if-curl-file_get_contents-are-enabled/#findComment-352102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.