You are here

function shrinktheweb_getThumbnailStatus in ShrinkTheWeb 8

Same name and namespace in other branches
  1. 6 shrinktheweb.api.inc \shrinktheweb_getThumbnailStatus()
  2. 7 shrinktheweb.api.inc \shrinktheweb_getThumbnailStatus()

Get thumbnail status

Parameters

$s:

Return value

array|bool

1 call to shrinktheweb_getThumbnailStatus()
shrinktheweb_getXMLResponse in ./shrinktheweb.api.inc
Store the XML response in an array and generate status bits.

File

./shrinktheweb.api.inc, line 772

Code

function shrinktheweb_getThumbnailStatus($s) {
  $sRegex = '/<[^:]*:ThumbnailResult?[^>]*>[^<]*<[^:]*:Thumbnail\\s*(?:Exists=\\"((?:true)|(?:false))\\")+[^>]*>([^<]*)<\\//';
  if (preg_match($sRegex, $s, $sMatches)) {
    return array(
      'stw_action' => $sMatches[1],
      'thumbnail' => $sMatches[2],
    );
  }
  return FALSE;
}