OpenInviter
[ class tree: OpenInviter ] [ index: OpenInviter ] [ all elements ]

Class: openinviter_base

Source Location: /plugins/_base.php

Class Overview


The core of the OpenInviter system


Author(s):

  • OpenInviter

Version:

  • 1.9.0

Methods


Child classes:

update
The core of the OpenInviter system
badoo
The core of the OpenInviter system
web_de
web.de Plugin
walla
Walla Plugin
facebook
FaceBook Plugin
gawab
Gawab Plugin
gmail
GMail Plugin
kids
Kids Plugin
freemail
Freemail.hu Plugin
vimeo
Vimeo Plugin
mail_com
Mail.com
yandex
Yandex Plugin
rediff
Rediff Plugin
mevio
Mvio Plugin
xing
Xing Plugin
popstarmail
popstarmail Plugin
myspace
MySpace Plugin
libero
Libero Plugin
rambler
Rambler Plugin
brazencareerist
Brazencareerist Plugin
gmx_net
GMX.net Plugin
canoe
Canoe Plugin
mycatspace
Mycatspace Plugin
bordermail
Bordermail Plugin
mail_ru
Mail.ru Plugin
_hosted
OpenInviter Hosted Solution
meta
Meta Plugin
friendster
Friendster Plugin
hi5
Hi5 Plugin
doramail
Doramail.com Plugin
netaddress
Netadress Plugin
katamail
KataMail Plugin
mynet
Mynet Plugin
sapo
Sapo Plugin
kincafe
kincafe Plugin
uk2
Uk2 Plugin
flingr
Flingr Plugin
flixster
Flixster Plugin
fdcareer
fdcareer Plugin
fastmail
FastMail Plugin
evite
Evite Plugin
xuqa
Xuqa Plugin
livejournal
Livejournal Plugin
bookcrossing
bookcrossing.com Plugin
inbox
Inbox.com Plugin
inet
Inet Plugin
famiva
Famiva Plugin
hotmail
Live/Hotmail Plugin
friendfeed
FaceBook Plugin
tagged
Tagged Plugin
ning
Ning Plugin
apropo
Apropo.com Plugin
abv
Abv Plugin
konnects
Konnects Plugin
bigstring
Bigstring Plugin
meinvz
MeinVz Plugin
interia
Interia.pl Plugin
motortopia
Motortopia Plugin
operamail
OperaMail Plugin
netlog
Netlog Plugin
linkedin
LinkedIn
skyrock
Skyrock Plugin
plaxo
plaxo.com Plugin
techemail
Techemail Plugin
aol
AOL Plugin
lycos
Lycos Plugin
mydogspace
Mydogspace Plugin
lovento
Lovento Plugin
plazes
Plazes Plugin
mail2world
Mail2World Plugin
nz11
Netadress Plugin
cyworld
Cyworld Plugin
graffiti
Bordermail Plugin
bebo
Bebo Plugin
youtube
Youtube Plugin
atlas
Atlas.cz Plugin
plurk
Plurk Plugin
virgilio
Virgilio.it Plugin
wpl
Wp.pt Plugin
orkut
The core of the OpenInviter system
faces
Faces Plugin
fm5
5FM.za.com Plugin
terra
Terra Plugin
zapak
Zapakmail Plugin
twitter
Twitter Plugin
eons
Eons Plugin
clevergo
Doramail.com Plugin
xanga
Xanga Plugin
mail_in
Mail_in Plugin
multiply
Multiply Plugin
flickr
Flickr Plugin
aussiemail
Aussiemail Plugin
azet
Azet Plugin
yahoo
Yahoo! Plugin
koolro
Koolro Plugin
o2
O2 Plugin
pochta
Pochta Plugin
lastfm
LastFm Plugin
hushmail
Hushmail Plugin
vkontakte
Cyworld Plugin
hyves
http://hyves.net/ Plugin
care2
Care2 Plugin
perfspot
Perfspot Plugin

Class Details

[line 10]
The core of the OpenInviter system

Contains methods and properties used by all the OpenInivter plugins




Tags:

author:  OpenInviter
version:  1.9.0


[ Top ]


Class Methods


method buildDebugHuman [line 613]

string buildDebugHuman( )

Transform the debug buffer in a human readable form

Parses the debug buffer and renders it in a human readable form




Tags:

return:  The debug buffer in a human readable form


[ Top ]

method buildDebugXML [line 576]

string buildDebugXML( )

Transform the debug buffer to an XML

Parses the debug buffer and creates an XML from the information it contains




Tags:

return:  The debug buffer formated as an XML


[ Top ]

method checkResponse [line 496]

bool checkResponse( string $step, string $server_response)

Check a request's response

Checks if a request was successful by searching for a token inside it




Tags:

return:  TRUE if successful, FALSE otherwise.


Parameters:

string   $step   The name of the step being checked
string   $server_response   The bulk request response

[ Top ]

method checkSession [line 166]

bool checkSession( )

Check for an active session

Checks if there is any active session




Tags:

return:  TRUE if there is an active session, FALSE otherwise.


[ Top ]

method debugRequest [line 707]

bool debugRequest( )

Execute the debugger

Executes the debugger and takes action according to the local and remote debug settings




Tags:

return:  FALSE if the debugged session contained any errors, TRUE otherwise.


[ Top ]

method endSession [line 201]

void endSession( )



[ Top ]

method followLocation [line 145]

string followLocation( string $result, string $old_url)

Extract Location: header

Extracts Location: header from a POST or GET request that includes the header information




Tags:

return:  The URL that it is being redirected to


Parameters:

string   $result   The request result including header information
string   $old_url   The url in which the request was initially made

[ Top ]

method get [line 304]

mixed get( string $url, [bool $follow = false], [bool $header = false], [bool $quiet = true], [mixed $referer = false], [array $headers = array()])

Execute a GET request

Executes a GET request to the provided URL taking into consideration the settings and request options.




Tags:

return:  The request response or FALSE if the response if empty.


Parameters:

string   $url   The URL that is going to be requested
bool   $follow   If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
bool   $header   If TRUE the returned value will also contain the received header information of the request
bool   $quiet   If FALSE it will output detailed request header information
mixed   $referer   If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
array   $headers   An array of custom headers to be sent to the server

[ Top ]

method getCookiePath [line 221]

string getCookiePath( [ $session_id = false])

Get the cookies file path

Gets the path to the file storing all the cookie for the current session




Tags:

return:  The path to the cookies file.


Parameters:

   $session_id  

[ Top ]

method getElementDOM [line 36]

mixed getElementDOM( string $string_bulk, string $query, [string $attribute = false], string $type)

Execute an XPath query

Executes an XPath query on a HTML bulk, extracting either an attribute or the node value




Tags:

return:  Returns the result array of the XPath or FALSE if no values were found


Parameters:

string   $string_bulk   The HTML string the XPath is executed onto
string   $query   The XPath query that is being evaluated
string   $type   The target of the query (an attribute or the node value)
string   $attribute   The attribute's value to be extracted.

[ Top ]

method getElementString [line 67]

string getElementString( string $string_to_search, string $string_start, string $string_end)

Extract a substring from a string

Extracts a substring that is found between two tokens from a string




Tags:

return:  The substring that is between the start and end tokens


Parameters:

string   $string_to_search   The main string that is being processed
string   $string_start   The start token from which the substring extraction begins
string   $string_end   The end token where which marks the substring's end

[ Top ]

method getHiddenElements [line 87]

array getHiddenElements( string $string_bulk)

Extracts hidden elements from a HTML bulk

Extracts all the <input type='hidden'> elements from a HTML bulk




Tags:

return:  An array shaped as name=>value of all the <input type='hidden'> fields


Parameters:

string   $string_bulk   The HTML bulk from which the fields are extracted

[ Top ]

method getLogoutPath [line 236]

string getLogoutPath( [ $session_id = false])

Get the logout file path

Gets the path to the file storing the logout link.




Tags:

return:  The path to the file storing the logout link.


Parameters:

   $session_id  

[ Top ]

method getProxy [line 463]

void getProxy( )



[ Top ]

method getSessionID [line 179]

string getSessionID( )

Get the OpenInviter session ID

Gets the current OpenInviter session ID or creates one if there is no active session.




Tags:

return:  The current session ID if there is an active session or the generated session ID otherwise.


[ Top ]

method init [line 252]

void init( [mixed $session_id = false])

Intialize transport

Intializes the transport being used for request taking into consideration the settings and creating the file being used for storing cookie.




Parameters:

mixed   $session_id   The OpenInviter session ID of the current user if any.

[ Top ]

method isEmail [line 531]

bool isEmail( string $email)

Validate an email

Validates an email address syntax using regular expressions




Tags:

return:  TRUE if the email is valid, FALSE otherwise.


Parameters:

string   $email   The email address to be validated

[ Top ]

method localDebug [line 649]

void localDebug( [string $type = 'error'])

Write debug information

Stores debug information to the local log files




Parameters:

string   $type   The type of debug information.

[ Top ]

method logAction [line 511]

void logAction( string $message, [string $type = 'error'])

Write an action to the log

Writes an action to a certain log file.




Parameters:

string   $message   The message to be written to the log file.
string   $type   The type of the log to be written to.

[ Top ]

method login [line 754]

void login( $user, $pass)



Overridden in child classes as:

update::login()
badoo::login()
Login function
web_de::login()
Login function
walla::login()
Login function
facebook::login()
Login function
gawab::login()
Login function
gmail::login()
Login function
kids::login()
Login function
freemail::login()
Login function
vimeo::login()
Login function
mail_com::login()
Login function
yandex::login()
Login function
rediff::login()
Login function
mevio::login()
Login function
xing::login()
Login function
popstarmail::login()
Login function
myspace::login()
Login function
libero::login()
Login function
rambler::login()
Login function
brazencareerist::login()
Login function
gmx_net::login()
Login function
canoe::login()
Login function
mycatspace::login()
Login function
bordermail::login()
Login function
mail_ru::login()
Login function
_hosted::login()
Login function
meta::login()
Login function
friendster::login()
Login function
hi5::login()
Login function
doramail::login()
Login function
netaddress::login()
Login function
katamail::login()
Login function
mynet::login()
Login function
sapo::login()
Login function
kincafe::login()
Login function
uk2::login()
Login function
flingr::login()
Login function
flixster::login()
Login function
fdcareer::login()
Login function
fastmail::login()
Login function
evite::login()
Login function
xuqa::login()
Login function
livejournal::login()
Login function
bookcrossing::login()
Login function
inbox::login()
Login function
inet::login()
Login function
famiva::login()
Login function
hotmail::login()
Login function
friendfeed::login()
Login function
tagged::login()
Login function
ning::login()
Login function
apropo::login()
Login function
abv::login()
Login function
konnects::login()
Login function
bigstring::login()
Login function
meinvz::login()
Login function
interia::login()
Login function
motortopia::login()
Login function
operamail::login()
Login function
netlog::login()
Login function
linkedin::login()
Login function
skyrock::login()
Login function
plaxo::login()
Login function
techemail::login()
Login function
aol::login()
Login function
lycos::login()
Login function
mydogspace::login()
Login function
lovento::login()
Login function
plazes::login()
Login function
mail2world::login()
Login function
nz11::login()
Login function
cyworld::login()
Login function
graffiti::login()
Login function
bebo::login()
Login function
youtube::login()
Login function
atlas::login()
Login function
plurk::login()
Login function
virgilio::login()
Login function
wpl::login()
Login function
orkut::login()
faces::login()
Login function
fm5::login()
Login function
terra::login()
Login function
zapak::login()
Login function
twitter::login()
Login function
eons::login()
Login function
clevergo::login()
Login function
xanga::login()
Login function
mail_in::login()
Login function
multiply::login()
Login function
flickr::login()
Login function
aussiemail::login()
Login function
azet::login()
Login function
yahoo::login()
Login function
koolro::login()
Login function
o2::login()
Login function
pochta::login()
Login function
lastfm::login()
Login function
hushmail::login()
Login function
vkontakte::login()
Login function
hyves::login()
Login function
care2::login()
Login function
perfspot::login()
Login function

Parameters:

   $user  
   $pass  

[ Top ]

method parseCSV [line 111]

mixed parseCSV( string $file, [string $delimiter = ','])

Parse a CSV string into an array

Parses the CSV data from a string into an array, reading the first line of the bulk as the CSV header




Tags:

return:  The array of CSV entries or FALSE if the CSV has no entries


Parameters:

string   $file   The CSV bulk
string   $delimiter   The character that separates the values of two fields

[ Top ]

method post [line 387]

mixed post( string $url, mixed $post_elements, [bool $follow = false], [bool $header = false], [mixed $referer = false], [array $headers = array()], [bool $raw_data = false], [bool $quiet = true])

Execute a POST request

Executes a POST request to the provided URL taking into consideration the settings and request options.




Tags:

return:  The request response or FALSE if the response if empty.


Parameters:

string   $url   The URL that is going to be requested
mixed   $post_elements   An array of all the elements being send to the server or a string if we are sending raw data
bool   $follow   If TRUE the request will follow HTTP-REDIRECTS by parsing the Location: header.
bool   $header   If TRUE the returned value will also contain the received header information of the request
mixed   $referer   If FALSE it will not send any HTTP_REFERER headers to the server. Otherwise the value of this variable is the HTTP_REFERER sent.
array   $headers   An array of custom headers to be sent to the server
bool   $raw_data   If TRUE the post elements will be send as raw data.
bool   $quiet   If FALSE it will output detailed request header information

[ Top ]

method remoteDebug [line 662]

bool remoteDebug( )

Send debug information to server

Sends debug information to the OpenInviter server.




Tags:

return:  TRUE on success, FALSE on failure.


[ Top ]

method resetDebugger [line 727]

void resetDebugger( )

Reset the debugger

Empties the debug buffer and resets the errors trigger




[ Top ]

method returnContacts [line 733]

void returnContacts( $contacts)



Parameters:

   $contacts  

[ Top ]

method startSession [line 184]

void startSession( [ $session_id = false])



Parameters:

   $session_id  

[ Top ]

method stopPlugin [line 479]

void stopPlugin( [bool $graceful = false])

Stops the internal plugin

Stops the internal plugin deleting the cookie file or keeping it is the stop is being graceful




Parameters:

bool   $graceful  

[ Top ]

method updateDebugBuffer [line 548]

void updateDebugBuffer( string $step, string $url, string $method, [bool $response = true], [mixed $elements = false])

Update the internal debug buffer

Updates the internal debug buffer with information about the request just performed and it's state




Parameters:

string   $step   The name of the step being debugged
string   $url   The URL that was being requested
string   $method   The method used to request the URL (GET/POST)
bool   $response   The state of the request
mixed   $elements   An array of elements being sent in the request or FALSE if no elements are sent.

[ Top ]


Documentation generated on Tue, 23 Feb 2010 02:00:40 +0200 by phpDocumentor 1.4.1