<?php 
    class Database {
        private $host 			= "142.44.211.26";
        private $database_name 	= "gere8756___imobiliario_DEV";
        private $username 		= "gere8756_loteamentos";
        private $password 		= "Gerencie1535";

        public $conn;

        public function getConnection(){
            $this->conn = null;
            try{
                $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->database_name, $this->username, $this->password);
                $this->conn->exec("set names utf8");
            }catch(PDOException $exception){
                echo "Database could not be connected: " . $exception->getMessage();
            }
            return $this->conn;
        }
    }  
?>