conn()) { die('Failed to connect with MySQL'); self::close(); } } public function conn() { $host = "localhost"; $user = ""; $pass = ""; $name = ""; $conn = mysqli_connect($host,$user,$pass,$name); if (mysqli_connect_errno()) { die("Failed to connect with MySQL: ".mysqli_connect_error()); } else { return $this->conn = $conn; } } public function head($title,$content,$siteurl) { echo ''; echo ''; echo ''.$title.''; echo ''.$siteurl.''; echo 'https://pastebin.echosystem.fr/theme/blue/img/favicon.icohttps://pastebin.echosystem.fr'; echo ''.$content.''; echo 'en-us'; //echo ''; echo ''; } //public function feed($title,$url,$content,$publish) //$date= date('d M Y H:i:s', $row['now_time']); //$date2=date("D, d M Y H:i:s", strtotime($date)); public function feed($title,$url,$content,$now_time) { echo ' '.$title.' '.$url.' '.$content.' '.$now_time.' '; } public function foot() { echo ''; echo ''; } public function clean($string) { $string = strtolower( preg_replace('@[\W_]+@', '-', $string) ); $string = rtrim($string,'-'); $string = strtolower($string); return $string; } public function close() { mysqli_close(self::conn()); } } ?>