Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Symfony 2 Bundle For CURL use
PHP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Adapter
Exception
Features
Util
HighcoCurlBundle.php
README
README.md

README.md

HighcoCurlBundle

This bundle uses the php curl library.

Requirements:

  • php built with curl support

Simple example:

<?php
use Highco\CurlBundle\Adapter\DefaultCurl;

$curl = new DefaultCurl;

$result = $curl->call('https://my.site.com/api.php', DefaultCurl::REQUEST_GET, array('call' => 'someCall'));
/* @var $result Highco\CurlBundle\Util\ResultAtom */

Example using mutual authentication over SSLv3:

<?php
use Highco\CurlBundle\Adapter\DefaultCurl;

$curlOptions = array(
    CURLOPT_SSLCERT         => '/path/to/ssl/cert',
    CURLOPT_SSLKEY          => '/path/to/ssl/key',
    CURLOPT_CAINFO          => '/path/to/ssl/ca',
    CURLOPT_SSL_VERIFYPEER  => 1,
    CURLOPT_SSL_VERIFYHOST  => 2,
    CURLOPT_SSLVERSION      => 3,
);

$curl = new DefaultCurl;

$result = $curl->call('https://my.site.com/api.php', DefaultCurl::REQUEST_GET, array('call' => 'someCall'), $curlOptions);
/* @var $result Highco\CurlBundle\Util\ResultAtom */
Something went wrong with that request. Please try again.