# \cge_http

A set of utility functions for performing http requests.

This class uses an embedded http object, which in turn relies on curl (or attempts to use fsockupeon if all else fails) to perform http requests.

## Summary

Methods
Properties
Constants
reset()
get_http()
post()
get()
status()
result()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A
final

File
  lib/class.cge_http.php
Package
  \CGExtensions
Class hierarchy
  \cge_http

## Tags

todo |

## Methods

### reset()

    reset()

Reset the http object state to default values.

#

static

## Tags

todo |

### get_http()

    get_http() : \http

Get the internal HTTP object

#### Returns

\http

#

static

## Tags

todo |

### post()

    post(string $URL, array $data, string $referer) : string

Send a POST request to the specified URL

#### Parameters

string | $URL | The specified data
array | $data | Data to associate with the URL
string | $referer | An optional referer string. If not specified, a preset value is used.

#### Returns

string —

The HTML or other data returned from the request."

#

static

## Tags

todo |

### get()

    get(string $URL, string $referer, bool $use_curl) : string

Send a GET request to the specified URL.

This method will use file_get_contents to read the URL if curl is not available, or use_curl is set to false.

#### Parameters

string | $URL |
string | $referer | An optional referer string
bool | $use_curl |

#### Returns

string

#

static

## Tags

todo |

### status()

    status() : int

Get the status of the last http request

#### Returns

int

#

static

## Tags

todo |

### result()

    result() : string

Get the result of the last http request

#### Returns

string

#

static

## Tags

todo |

### class.cge_http.php