You are here

public function GoogleMini::setDomainRestriction in Google Search Appliance 6.2

Same name and namespace in other branches
  1. 5 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 121

Class

GoogleMini

Code

public function setDomainRestriction($domain) {
  if ($this->_queryParts['q']) {
    $this->_queryParts['q'] .= "%20site:{$domain}";
  }
  else {
    $this
      ->setQueryPart('q', "site:" . urlencode($domain));
  }
}