CI_Trackback

class CI_Trackback

$data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '')

Trackback data array.

$convert_ascii = TRUE

Whether to convert high ASCII and MS Word characters to HTML entities.

send($tb_data)
Parameters:
  • $tb_data (array) – Trackback data
Returns:

TRUE on success, FALSE on failure

Return type:

bool

Send trackback.

receive()
Returns: TRUE on success, FALSE on failure
Return type: bool

This method simply validates the incoming TB data, returning TRUE on success and FALSE on failure. If the data is valid it is set to the $this->data array so that it can be inserted into a database.

send_error([$message = 'Incomplete information'])
Parameters:
  • $message (string) – Error message
Return type:

void

Responses to a trackback request with an error message.

Note

This method will terminate script execution.

send_success()
Return type: void

Responses to a trackback request with a success message.

Note

This method will terminate script execution.

data($item)
Parameters:
  • $item (string) – Data key
Returns:

Data value or empty string if not found

Return type:

string

Returns a single item from the reponse data array.

process($url, $data)
Parameters:
  • $url (string) – Target url
  • $data (string) – Raw POST data
Returns:

TRUE on success, FALSE on failure

Return type:

bool

Opens a socket connection and passes the data to the server, returning TRUE on success and FALSE on failure.

extract_urls($urls)
Parameters:
  • $urls (string) – Comma-separated URL list
Returns:

Array of URLs

Return type:

array

This method lets multiple trackbacks to be sent. It takes a string of URLs (separated by comma or space) and puts each URL into an array.

validate_url(&$url)
Parameters:
  • $url (string) – Trackback URL
Return type:

void

Simply adds the http:// prefix it it’s not already present in the URL.

get_id($url)
Parameters:
  • $url (string) – Trackback URL
Returns:

URL ID or FALSE on failure

Return type:

string

Find and return a trackback URL’s ID or FALSE on failure.

convert_xml($str)
Parameters:
  • $str (string) – Input string
Returns:

Converted string

Return type:

string

Converts reserved XML characters to entities.

limit_characters($str[, $n = 500[, $end_char = '…']])
Parameters:
  • $str (string) – Input string
  • $n (int) – Max characters number
  • $end_char (string) – Character to put at end of string
Returns:

Shortened string

Return type:

string

Limits the string based on the character count. Will preserve complete words.

convert_ascii($str)
Parameters:
  • $str (string) – Input string
Returns:

Converted string

Return type:

string

Converts high ASCII text and MS Word special characterss to HTML entities.

set_error($msg)
Parameters:
  • $msg (string) – Error message
Return type:

void

Set an log an error message.

display_errors([$open = '

'[, $close = '

']])

Parameters:
  • $open (string) – Open tag
  • $close (string) – Close tag
Returns:

HTML formatted error messages

Return type:

string

Returns error messages formatted in HTML or an empty string if there are no errors.

doc_CodeIgniter
2016-10-15 16:31:57
Comments
Leave a Comment

Please login to continue.