street = $street; $this->city = $city; $this->state = $state; $this->zip = $zip; $url = Olio::$config['geocoderURL'].'?appid=gsd5f&street='. $this->street.'&city='.$this->city. '&state='.$this->state.'&zip='.$this0->zip; $stream = $this->curl_string($url); $xmlBegin= strpos($stream, 'latitude = $xml->Result->Latitude; $this->longitude = $xml->Result->Longitude; } private function curl_string($url) { $ch = curl_init(); $geoProxy = trim(Olio::$config['proxy']); if (strlen($geoProxy) > 0) { curl_setopt($ch, CURLOPT_PROXY, $geoProxy); } else { curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0); } curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0'); //curl_setopt ($ch, CURLOPT_COOKIEJAR, "c:\cookie.txt"); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); //curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec ($ch); curl_close($ch); return $result; } } ?>