Activating cURL Support in Your Apps #
ExeOutput for PHP allows you to access the cURL library that ships with PHP, enabling you to make requests to URLs using various protocols such as HTTP, HTTPS, FTP, and more.
To use cURL in your app, you must first enable the cURL PHP extension in ExeOutput for PHP. In ExeOutput for PHP, navigate to PHP Settings -> PHP Extensions. Select php_curl.dll, right-click it, and choose Compile into the EXE from the context menu.

After this, cURL functions will be accessible.
Tip
Please refer to the cURL topic of the General Demonstration for a working cURL demo with HTTPS support.
Note
The cURL extension requires additional dependencies (such as libeay32.dll, libssh2.dll, ssleay32.dll, and nghttp2.dll). ExeOutput for PHP automatically compiles these dependencies into the EXE if you choose “Compile into the EXE” for cURL. Conversely, if you choose “Copy…outside the EXE”, these DLLs will be copied to the same folder as your EXE file.
Accessing Secure Websites with HTTPS #
Without the correct configuration, attempts to access an HTTPS (SSL/TLS-protected) resource in PHP using cURL will likely fail.
The proper way to handle this is to include the cacert.pem file with your app. cacert.pem is a bundle of CA certificates that cURL uses to verify the identity of the remote server.
You can download an up-to-date cacert.pem file here.
Then, place the cacert.pem file in your project’s Source folder (for instance, the root folder, which is “Application Root” in the File Manager).
Finally, provide cURL with the full path to the cacert.pem file by using the following PHP code:
<?php
// ...
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "\\cacert.pem");
// ...
?>This code assumes that cacert.pem is in the same folder as the executing PHP script.
Tip
Please refer to the cURL topic of the General Demonstration for a working cURL demo with HTTPS support.
See also: PHP Extensions