status_code,
array(200, 201, 202, 203, 204, 205, 206, 404, 501))) {
return $response;
}
$ok = false;
$cts = array('text/html', 'text/html', 'application/xhtml+xml');
foreach ($cts as $ct) {
if (false !== strripos($response->headers['Content-Type'], $ct)) {
$ok = true;
break;
}
}
if ($ok == false) {
return $response;
}
$replacead1 = $this->makead(Pluf::f("google_ads")["AD1"]);
$replacead2 = $this->makead(Pluf::f("google_ads")["AD2"]);
$response->content = str_replace('', $replacead1, $response->content);
$response->content = str_replace('', $replacead2, $response->content);
return $response;
}
private function makead($ad)
{
$ret = '";
$ret .= '';
return $ret;
}
}