Solved

PHP: Test for cURL Support

Posted on 2010-11-09
1
393 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
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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 look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

832 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