Solved

PHP: Test for cURL Support

Posted on 2010-11-09
1
372 Views
Last Modified: 2012-06-27
How can I test if cURL is supported by an installation of PHP?
<?php

if( cURL_supported===true ) {echo 'cURL Supported!';}

?>

Open in new window

0
Comment
Question by:hankknight
1 Comment
 
LVL 4

Accepted Solution

by:
aconrad earned 500 total points
Comment Utility
use function_exists('curl_init')
<?php

$cURL_supported = function_exists('curl_init');

if( $cURL_supported===true ) {echo 'cURL Supported!';}



?>

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now