Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP: Test for cURL Support

Posted on 2010-11-09
1
Medium Priority
?
424 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 2000 total points
ID: 34095368
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

782 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