Cheetah
Functions | Variables
ChSitesSTW.php File Reference

Go to the source code of this file.

Functions

 getThumbnailHTML ($sUrl, $aOptions, $sAttribAlt=false, $sAttribClass=false, $sAttribStyle=false)
 
 saveAccountInfo ()
 
 deleteThumbnail ($sUrl, $aOptions=array())
 
 _getThumbnailPaid ($sUrl, $aOptions, $sAttribAlt, $sAttribClass, $sAttribStyle)
 
 _getThumbnail ($sUrl, $aOptions)
 
 _generateOptions ($aOptions)
 
 _generateRequestArgs ($aOptions)
 
 _getCachedThumbnail ($aArgs=null)
 
 _checkWebsiteThumbnailCaptured ($aArgs)
 
 _downloadRemoteImageToLocalPath ($sRemoteUrl, $sFile)
 
 _getNoResponseImage ($sUrl, $aOptions)
 
 _checkLimitReached ($sFile)
 
 _createCacheDirectory ()
 
 _generateHash ($aArgs)
 
 _getXMLResponse ($sResponse)
 
 _getLegacyResponse ($sSearch, $s)
 
 _getThumbnailStatus ($s)
 
 _cacheFileExpired ($sFile)
 
 _getArrayValue ($aArray, $sKey, $isReturnSpace=false)
 
 _getAccXMLResponse ($sResponse)
 

Variables

const ACCESS_KEY getParam('ch_sites_key_id')
 
const SECRET_KEY getParam('ch_sites_secret_key')
 
const ACCOUNT_TYPE getParam('ch_sites_account_type')
 
const THUMBNAIL_URI $GLOBALS['oChSitesModule']->sThumbUrl
 
const THUMBNAIL_DIR $GLOBALS['oChSitesModule']->sThumbPath
 
const INSIDE_PAGES getParam('ch_sites_inside_pages') == 'on' ? true : false
 
const CUSTOM_MSG_URL getParam('ch_sites_custom_msg_url')
 
const CACHE_DAYS getParam('ch_sites_cache_days')
 
const VER '2.0.3_dol7'
 
const DEBUG getParam('ch_sites_debug') == 'on' ? true : false
 
const QUOTA_IMAGE 'quota.jpg'
 
const BANDWIDTH_IMAGE 'bandwidth.jpg'
 
const NO_RESPONSE_IMAGE 'no_response.jpg'
 

Function Documentation

◆ _cacheFileExpired()

_cacheFileExpired (   $sFile)

Determine if specified file has expired from the cache

Definition at line 541 of file ChSitesSTW.php.

◆ _checkLimitReached()

_checkLimitReached (   $sFile)

Check if the limit reached image is existing, if so return true return false if there is no image existing or the limit reached file is older then 6 hours

Definition at line 398 of file ChSitesSTW.php.

◆ _checkWebsiteThumbnailCaptured()

_checkWebsiteThumbnailCaptured (   $aArgs)

Method that checks if the thumbnail for the specified website exists.

Definition at line 293 of file ChSitesSTW.php.

◆ _createCacheDirectory()

_createCacheDirectory ( )

Create the cache directory if it doesn't exist

Definition at line 419 of file ChSitesSTW.php.

◆ _downloadRemoteImageToLocalPath()

_downloadRemoteImageToLocalPath (   $sRemoteUrl,
  $sFile 
)

Method to get image at the specified remote Url and attempt to save it to the specifed local path

Definition at line 331 of file ChSitesSTW.php.

◆ _generateHash()

_generateHash (   $aArgs)

Generate the hash for the thumbnail

Definition at line 433 of file ChSitesSTW.php.

◆ _generateOptions()

_generateOptions (   $aOptions)

generate options

Definition at line 137 of file ChSitesSTW.php.

◆ _generateRequestArgs()

_generateRequestArgs (   $aOptions)

generate the request arguments

Definition at line 155 of file ChSitesSTW.php.

◆ _getAccXMLResponse()

_getAccXMLResponse (   $sResponse)

store the Account XML response in an array

Definition at line 576 of file ChSitesSTW.php.

◆ _getArrayValue()

_getArrayValue (   $aArray,
  $sKey,
  $isReturnSpace = false 
)

Safe method to get the value from an array using the specified key

Definition at line 559 of file ChSitesSTW.php.

◆ _getCachedThumbnail()

_getCachedThumbnail (   $aArgs = null)

Get a thumbnail, caching it first if possible.

Definition at line 230 of file ChSitesSTW.php.

◆ _getLegacyResponse()

_getLegacyResponse (   $sSearch,
  $s 
)

Definition at line 519 of file ChSitesSTW.php.

◆ _getNoResponseImage()

_getNoResponseImage (   $sUrl,
  $aOptions 
)

Gets the account problem image and returns the relative path to the cached image

Definition at line 356 of file ChSitesSTW.php.

◆ _getThumbnail()

_getThumbnail (   $sUrl,
  $aOptions 
)

Gets the thumbnail for the specified website, stores it in the cache, and then returns the relative path to the cached image.

Definition at line 110 of file ChSitesSTW.php.

◆ _getThumbnailPaid()

_getThumbnailPaid (   $sUrl,
  $aOptions,
  $sAttribAlt,
  $sAttribClass,
  $sAttribStyle 
)

Definition at line 82 of file ChSitesSTW.php.

◆ _getThumbnailStatus()

_getThumbnailStatus (   $s)

Definition at line 528 of file ChSitesSTW.php.

◆ _getXMLResponse()

_getXMLResponse (   $sResponse)

store the XML response in an array and generate status bits

Definition at line 452 of file ChSitesSTW.php.

◆ deleteThumbnail()

deleteThumbnail (   $sUrl,
  $aOptions = array() 
)

Delete thumbnail

Definition at line 68 of file ChSitesSTW.php.

◆ getThumbnailHTML()

getThumbnailHTML (   $sUrl,
  $aOptions,
  $sAttribAlt = false,
  $sAttribClass = false,
  $sAttribStyle = false 
)

Gets the thumbnail for the specified website, stores it in the cache, and then returns the HTML for loading the image. This handles the ShrinkTheWeb javascript loader for free basic accounts.

Definition at line 34 of file ChSitesSTW.php.

◆ saveAccountInfo()

saveAccountInfo ( )

Get Account XML response and save it into database

Definition at line 49 of file ChSitesSTW.php.

Variable Documentation

◆ ACCESS_KEY

const ACCESS_KEY getParam('ch_sites_key_id')

This work, "Cheetah - https://www.cheetahwsb.com", is a derivative of "Dolphin Pro V7.4.2" by BoonEx Pty Limited - https://www.boonex.com/, used under CC-BY. "Cheetah" is licensed under CC-BY by Dean J. Bassett Jr. CC-BY License - http://creativecommons.org/licenses/by/3.0/

Definition at line 8 of file ChSitesSTW.php.

◆ ACCOUNT_TYPE

const ACCOUNT_TYPE getParam('ch_sites_account_type')

Definition at line 10 of file ChSitesSTW.php.

◆ BANDWIDTH_IMAGE

const BANDWIDTH_IMAGE 'bandwidth.jpg'

Definition at line 21 of file ChSitesSTW.php.

◆ CACHE_DAYS

const CACHE_DAYS getParam('ch_sites_cache_days')

Definition at line 15 of file ChSitesSTW.php.

◆ CUSTOM_MSG_URL

const CUSTOM_MSG_URL getParam('ch_sites_custom_msg_url')

Definition at line 14 of file ChSitesSTW.php.

◆ DEBUG

const DEBUG getParam('ch_sites_debug') == 'on' ? true : false

Definition at line 19 of file ChSitesSTW.php.

◆ INSIDE_PAGES

const INSIDE_PAGES getParam('ch_sites_inside_pages') == 'on' ? true : false

Definition at line 13 of file ChSitesSTW.php.

◆ NO_RESPONSE_IMAGE

const NO_RESPONSE_IMAGE 'no_response.jpg'

Definition at line 22 of file ChSitesSTW.php.

◆ QUOTA_IMAGE

const QUOTA_IMAGE 'quota.jpg'

Definition at line 20 of file ChSitesSTW.php.

◆ SECRET_KEY

const SECRET_KEY getParam('ch_sites_secret_key')

Definition at line 9 of file ChSitesSTW.php.

◆ THUMBNAIL_DIR

const THUMBNAIL_DIR $GLOBALS['oChSitesModule']->sThumbPath

Definition at line 12 of file ChSitesSTW.php.

◆ THUMBNAIL_URI

const THUMBNAIL_URI $GLOBALS['oChSitesModule']->sThumbUrl

Definition at line 11 of file ChSitesSTW.php.

◆ VER

const VER '2.0.3_dol7'

Definition at line 18 of file ChSitesSTW.php.