Contact

public function urlswitch(){ $loc= $_SERVER['DOCUMENT_ROOT']."/content/home/https-switch.csv"; $cont = file_get_contents($loc); return trim($cont); } public function cndkeyall(){ $cdn=array("assets"=>"","content"=>"","thumbs"=>""); $cdnDir=$_SERVER['DOCUMENT_ROOT']."/config/cdn.txt"; if(file_exists($cdnDir)){ $content = file_get_contents($cdnDir); $split = explode(";", $content); foreach($split as $key => $val){ if( strpos( strtoupper($val), "ASSETS" ) !== false ) { $tmp = explode("=",$val); $cdn['assets']=$tmp[1]; } if( strpos( strtoupper($val), "CONTENT" ) !== false ) { $tmp = explode("=",$val); $cdn['content']=$tmp[1]; } if( strpos( strtoupper($val), "THUMBS" ) !== false ) { $tmp = explode("=",$val); $cdn['thumbs']=$tmp[1]; } } //echo $content; } //echo json_encode($cdn); $x = false; if(strpos( strtoupper($cdn['assets']),'HTTP:')!==false){ $x=true; } if(strpos( strtoupper($cdn['content']),'HTTP:')!==false){ $x=true; } if(strpos( strtoupper($cdn['thumbs']),'HTTP:')!==false){ $x=true; } return $x; }