예제 #1
0
 /** Get whether the rrcID exists in the CORR system
  * @access public
  * @param string $value
  * @return string
  */
 public function getType($rrcID)
 {
     $curl = new Pas_Curl();
     $curl->setUri('http://numismatics.org/ocre/id/' . $rrcID);
     $curl->getRequest();
     if ($curl->getResponseCode() == '200') {
         return true;
     }
 }
예제 #2
0
 /** Get the data with a specific method using Curl
  * @access public
  * @return string
  */
 public function requestWords($method, $data)
 {
     $data['key'] = $this->getApiKey();
     $data['lang'] = $this->getLanguage();
     $curl = new Pas_Curl();
     $curl->setUri(self::WHAT3WORDS_URI . $method . '?' . http_build_query($data));
     Zend_Debug::dump($curl->getRequest());
     $curl->getRequest();
     if ($curl->getResponseCode() == 200) {
         return $curl->getJson();
     } else {
         return false;
     }
 }