function shrinktheweb_getLegacyResponse in ShrinkTheWeb 8
Same name and namespace in other branches
- 6 shrinktheweb.api.inc \shrinktheweb_getLegacyResponse()
- 7 shrinktheweb.api.inc \shrinktheweb_getLegacyResponse()
Get status code in case of legacy response
Parameters
$sSearch:
$s:
Return value
bool
2 calls to shrinktheweb_getLegacyResponse()
- shrinktheweb_getAccXMLResponse in ./shrinktheweb.api.inc 
- Store the Account XML response in an array.
- shrinktheweb_getXMLResponse in ./shrinktheweb.api.inc 
- Store the XML response in an array and generate status bits.
File
- ./shrinktheweb.api.inc, line 759 
Code
function shrinktheweb_getLegacyResponse($sSearch, $s) {
  $sRegex = '/<[^:]*:' . $sSearch . '[^>]*>[^<]*<[^:]*:StatusCode[^>]*>([^<]*)<\\//';
  if (preg_match($sRegex, $s, $sMatches)) {
    return $sMatches[1];
  }
  return FALSE;
}