- Forums
- Scripts
- How To Check If Curl Installed In PHP Using This Simple Script
This Tutorial Will Show You How To Check Curl Installed In Php So If You Want To Know About Checking The Curl Configuration Whether Or Not Is Installed In Your Computer This Will Verify And See If You Have It Using A Php Script [2796], Last Updated: Mon Jun 24, 2024
Webune Support
Mon Jan 11, 2010
17 Comments
3793 Visits
Welcome to Webune Support Forums
Webune Offers PHP web hosting with Curl already enabled. if you are tired of your current web hosting provider, make the switch today to Webune!
If you are not a Webune customer yet, you might be wondering whether or not you have Curl enabled in you PHP configuration?
this post was created for the purpose of helping you determine if you have curl enabled or installed on your wesbite. to test if you have curl in you PHP, you will need to run a script provided on this post.
The scripts is very simple, yet its a helpful tool in checking to see if you have Curl in your website.
fore example, when you run this script, you will be able to see details about your Curl installation, this is a sample of what the script will show you:
Contragulations!!
Your have Curl enabled in your PHP.
You have version: 7.11.2 Iinstalled.
These are the protocols your server CURL supports:
* gopher
* telnet
* dict
* ldap
* http
* file
* https
as you can see, the script is able to show you what protocols you have configured. its helpful to know if you have php curl, it helps administrators and webmaster determine their installation configuration of their cURL on their websites. so to test follow this simple steps on this tutorial:
1. download the file attachment on this post
2. unzip it and upload the file to your website where you want to test
3. once you have uploaded the check-curl.php, open it with your browser from your website: example:
http://www.example.com/check-curl.php
then the information will be displayed on your browser and you can finally confirm whether or not you have curl installed on your linux or windows server with PHP.
if you need more help, please reply with your comments
If you can't download the file, here is the code
<?php /* SCRIPT CREATED AND DISTRIBUTED BY WWW.WEBUNE.COM*/ if (curl_version()) {
$WebuneCurl = curl_version();
echo '</ul>';
if ($_GET['details']) {
echo '<h1>Full Details:</h1><pre>';
print_r($WebuneCurl);
echo '</pre>';
} else {
echo '<h1>Contragulations!!</h1> Your have Curl enabled in your PHP.<br><br>';
echo 'You have version: ' . $WebuneCurl['version'] . ' Iinstalled.<br>These are the protocols your server CURL supports:<br>';
echo '<ul>';
for ($counter = 1; $counter <= $WebuneCurl['version']['protocols']; $counter++) {
echo '<li>' . $WebuneCurl['protocols'][$counter] . '</li>';
}
echo '</ul>';
echo '<p><a href="' . $_SERVER['PHP_SELF'] . '?details=1"> Click Here to see Full Details</a></p>';
}
} else {
echo "<h1>ERROR - IT APPEARS YOU DONT HAVE Curl ENABLED ON THIS SERVER</h1>";
} ?><p>If you need more help on CURL, visit us at <a href="">Webune Support Forums</a>
<p>
<p>Script Provided By:<br><a href="http://www.webune.com"><img src="http://www.webune.com/images/headers/default_logo.jpg" border="0" /></a></p
check-curl.zip