%PDF- %PDF-
Direktori : /home/devcapijob/.trash/archive_cron/ |
Current File : /home/devcapijob/.trash/archive_cron/db.php |
<?php error_reporting(E_ALL); ini_set('display_errors', 0); $servername = "localhost"; $username = "capijobnew_site"; $password = "Y1.g1dG}u}*m"; try { $conn = new PDO("mysql:host=$servername;dbname=capijobnew_site2", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $conn; } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } function genere_alias($string){ //remove any '-' from the string they will be used as concatonater $str = str_replace('-', ' ', $string); $str = htmlentities($str); $str = preg_replace(array('/ß/','/&(..)lig;/', '/&([aouAOU])uml;/','/&(.)[^;]*;/'),array('ss',"$1","$1".'e',"$1"),$str); // remove any duplicate whitespace, and ensure all characters are alphanumeric $str = preg_replace(array('/\s+/','/[^A-Za-z0-9\-]/'), array('-',''), $str); // lowercase and trim $str= str_replace('--','-',$str); $str = trim(strtolower($str)); return $str; } function word_texte($string){ $search = [ // www.fileformat.info/info/unicode/<NUM>/ <NUM> = 2018 "\xC2\xAB", // « (U+00AB) in UTF-8 "\xC2\xBB", // » (U+00BB) in UTF-8 "\xE2\x80\x98", // ‘ (U+2018) in UTF-8 "\xE2\x80\x99", // ’ (U+2019) in UTF-8 "\xE2\x80\x9A", // ‚ (U+201A) in UTF-8 "\xE2\x80\x9B", // ‛ (U+201B) in UTF-8 "\xE2\x80\x9C", // “ (U+201C) in UTF-8 "\xE2\x80\x9D", // ” (U+201D) in UTF-8 "\xE2\x80\x9E", // „ (U+201E) in UTF-8 "\xE2\x80\x9F", // ‟ (U+201F) in UTF-8 "\xE2\x80\xB9", // ‹ (U+2039) in UTF-8 "\xE2\x80\xBA", // › (U+203A) in UTF-8 "\xE2\x80\x93", // – (U+2013) in UTF-8 "\xE2\x80\x94", // — (U+2014) in UTF-8 "\xE2\x80\xA6", // … (U+2026) in UTF-8 "\r\n" // … (U+2026) in UTF-8 ]; $replacements = [ "<<", ">>", "'", "'", "'", "'", '"', '"', '"', '"', "<", ">", "-", "-", "...", " " ]; $content = str_replace($search, $replacements, $string); return $content; } ?>