|
VirtueMart
3.2.14.9808
|
Public Member Functions | |
| sendFile ($file, $mime, $overrideFileName='') | |
| http_rangeRequest ($size, $exitOnError=true) | |
Static Public Member Functions | |
| sendHeaderAndContent ($http_status=200, $content='', $mime_type='text/html') | |
| static | handleCommunication ($url, $postData='', $headers=array(), $fileToSaveData=null) |
Public Attributes | |
| $handle = null | |
Provides general tools to handle connections (http, headers, ... )
|
static |
This is a general function to safely open a connection to a server, post data when needed and read the result. Tries using cURL and switches to fopen/fsockopen if cURL is not available
| string | $url | |
| string | $postData | |
| array | $headers | |
| resource | $fileToSaveData |
| VmConnector::http_rangeRequest | ( | $size, | |
$exitOnError = true |
|||
| ) |
Checks and sets headers to handle range requets
| int | The file size |
| VmConnector::sendFile | ( | $file, | |
| $mime, | |||
$overrideFileName = '' |
|||
| ) |
Set headers and send the file to the client
| string | The full path to the file |
| string | The Mime Type of the file |
|
static |
Clears the output buffer, sends a http status code and a content if given
| int | $http_status | |
| string | $mime_type | |
| string | $content |
| VmConnector::$handle = null |
1.8.11