public function GoogleMini::setDomainRestriction in Google Search Appliance 5
Same name and namespace in other branches
- 6.2 GoogleMini.php \GoogleMini::setDomainRestriction()
Adds a site restriction. Useful if just querying by date, as that won't work unless you search for words or at least one other keyword search.
Parameters
string $domain:
File
- ./
GoogleMini.php, line 123
Class
Code
public function setDomainRestriction($domain) {
if ($this->_queryParts['q']) {
$this->_queryParts['q'] .= "%20site:{$domain}";
}
else {
$this
->setQueryPart('q', "site:" . urlencode($domain));
}
}