$peth=$_SERVER['DOCUMENT_ROOT']; $peth .="/"; //include $peth."common.php"; $removals = array(".mp3", "_"); if(!empty($_GET)) { if(isset($_GET['song'])) { $usern = trim($_GET['song']); if(!empty($usern)){ $rando = $usern; } } else { $usern = "http://joeybabcock.me/audio/raw_hide.mp3"; } if(isset($_GET['src'])) { $fh = trim($_GET['src']); if(!empty($fh)){ if($fh == 1){ $fromhome = 1; } } } } else { $rando = 2; $usern = "http://joeybabcock.me/audio/raw_hide.mp3"; } $parts = parse_url($usern); $filetoget = basename($parts['path']); $name = str_replace($removals, ' ', $filetoget); $filename = $peth.'audio/tunes/'.$filetoget; if (file_exists($filename)) { $using1 = ""; $using2 = "(Using)"; } else { $using1 = "(Using)"; $using2 = ""; file_put_contents($filename, fopen($usern, 'r')); } //settype($name, 'string'); //$recent = apc_fetch('recn'); //array_unshift($recent, $name); //$rec = array_pop($recent); //apc_store('recn', $recent); ?>