Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cHttpRequest
  • cHttpRequestCurl
  • cHttpRequestSocket
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cHttpRequestCurl

Curl implementation of HttpRequest.

cHttpRequest
Extended by cHttpRequestCurl
Package: Core
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Mischa Holz
Located at classes/httprequest/class.httprequestcurl.php
Methods summary
public
# __construct( string $url = '' )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Parameters

$url
string
$url [optional] URL for the request

See

cHttpRequest::__construct()
cHttpRequest::getHttpRequest()
public cHttpRequest
# setGetParams( array $array )

Set the GET parameters.

Set the GET parameters.

Parameters

$array
array
$array associative array containing keys and values of the GET parameters

Returns

cHttpRequest

See

cHttpRequest::setGetParams()
public cHttpRequest
# setPostParams( array $array )

Set the POST parameters.

Set the POST parameters.

Parameters

$array
array
$array associative array containing keys and values of the POST parameters

Returns

cHttpRequest

See

cHttpRequest::setPostParams()
public cHttpRequest
# setHeaders( array $array )

Set the HTTP headers.

Set the HTTP headers.

Parameters

$array
array
$array associative array containing the HTTP headers

Returns

cHttpRequest

See

cHttpRequest::setHeaders()
public cHttpRequest
# setURL( string $url )

Set the request URL.

Set the request URL.

Parameters

$url
string
$url the URL

Returns

cHttpRequest

See

cHttpRequest::setURL()
protected
# preparePostRequest( )

Inserts the POST array into the headers and encodes it.

Inserts the POST array into the headers and encodes it.

protected
# prepareGetRequest( )

Appends the GET array to the URL.

Appends the GET array to the URL.

protected
# prepareHeaders( )

Reads all the custom headers and add them to the header string.

Reads all the custom headers and add them to the header string.

protected string|boolean
# sendRequest( boolean $return, string $method, boolean $returnHeaders )

Send the request to the server.

Send the request to the server.

Parameters

$return
boolean
$return Wether the function should return the servers response
$method
string
$method GET or POST
$returnHeaders
boolean
$returnHeaders Wether the headers should be included in the response

Returns

string|boolean
public string|boolean
# postRequest( boolean $return = true, boolean $returnHeaders = false )

Perform the request using POST.

Perform the request using POST.

Parameters

$return
boolean
$return [optional] If true, response of the server gets returned as string
$returnHeaders
boolean
$returnHeaders [optional] If true, headers will be included in the response

Returns

string|boolean
False on error, response otherwise

See

cHttpRequest::postRequest()
public string|boolean
# getRequest( boolean $return = true, boolean $returnHeaders = false )

Perform the request using GET.

Perform the request using GET.

Parameters

$return
boolean
$return [optional] If true, response of the server gets returned as string
$returnHeaders
boolean
$returnHeaders [optional] If true, headers will be included in the response

Returns

string|boolean
False on error, response otherwise

See

cHttpRequest::getRequest()
public string|boolean
# request( boolean $return = true, boolean $returnHeaders = false )

Perform the request using POST AND append all GET parameters.

Perform the request using POST AND append all GET parameters.

Parameters

$return
boolean
$return [optional] If true, response of the server gets returned as string
$returnHeaders
boolean
$returnHeaders [optional] If true, headers will be included in the response

Returns

string|boolean
False on error, response otherwise

See

cHttpRequest::request()
public cHttpRequest
# setOpt( integer $curlOpt, mixed $value )

Sets CURL options.

Sets CURL options.

Parameters

$curlOpt
integer
$curlOpt One of the CURLOPT constants
$value
mixed
$value Value for the option

Returns

cHttpRequest

See

curl_setopt()
public resource
# getCurl( )

Returns the curl reference.

Returns the curl reference.

Returns

resource
Methods inherited from cHttpRequest
getHttpRequest()
Properties summary
protected mixed $curl
#

The curl instance.

The curl instance.

protected array $postArray
#

Array for the post parameters.

Array for the post parameters.

protected array $getArray
#

Array for the get parameters.

Array for the get parameters.

protected array $headerArray
#

Array for the HTTP-headers.

Array for the HTTP-headers.

protected string $url
#

Request URL.

Request URL.

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0