} $torrentSubCategory = $jsondata["torrents"][0]["sub_category"]; $seeders = $jsondata["torrents"][0]["seeds"]; $leeches = $jsondata["torrents"][0]["leeches"]; $file_count = $jsondata["torrents"][0]["file_count"]; $size = $jsondata["torrents"][0]["size"]; $upload_date = $jsondata["torrents"][0]["upload_date"]; $ts = $upload_date; $date = new DateTime("@{$ts}"); $upload_date = new DateTime($date->format('Y-m-d')); $uploader_username = $jsondata["torrents"][0]["uploader_username"]; $encodedTitle = urlencode($torrentTitle); $shareURL = "https://twitter.com/share?url=http://getstrike.net/torrents/{$torrentHash}&text=%40StrikeSearch%20Download%20{$encodedTitle}&hashtags=youareapirate"; $fileNames = $jsondata["torrents"][0]["file_info"]["file_names"]; $fileSizes = $jsondata["torrents"][0]["file_info"]["file_lengths"]; $contentArray = array_combine2($fileNames, $fileSizes); $totalBytes = array_sum($fileSizes); //$niceSize = formatBytes($totalBytes) //$pageJson = json_decode(file_get_contents("https://getstrike.net/api/v2/torrents/descriptions/?hash=$hash") , true); //$torrent_description = $pageJson["message"]; $content = "Unable to load"; //base64_decode($torrent_description); //$downloadJson = json_decode(file_get_contents("https://getstrike.net/api/v2/torrents/download/?hash=$hash") , true); $downloadLink = "https://getstrike.net/torrents/api/download/{$hash}.torrent"; //$downloadJson["message"]; $verifiedStatus = "This torrent has received no feedback and status cannot be decided"; //get_data("http://bitsnoop.com/api/fakeskan.php?hash=$torrentHash"); $date = new DateTime("@{$ts}"); $publicDate = $date->format('M d, Y'); $rssDate = $date->format(DateTime::RSS); $encodedTrackers = "&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969";
function format_nom_fichier($chaine) { $autorise = string2array('abcdefghijklmnopqrstuvwxyz0123456789-_.'); $caractere = string2array('àáâãäåòóôõöøèéêëçìíîïùúûüÿñ'); $remplacement = string2array('aaaaaaooooooeeeeciiiiuuuuyn'); $replace = array_combine2($caractere, $remplacement); $chaine = strtolower($chaine); $chaine = str_replace(' ', '', $chaine); $lng = mb_strlen($chaine, mb_internal_encoding()); $chaine_array = array(); for ($i = 0; $i < $lng; $i++) { $c = mb_substr($chaine, $i, 1, mb_internal_encoding()); if (!in_array($c, $autorise)) { if (array_key_exists($c, $replace)) { $chaine_array[] = $replace[$c]; } else { $chaine_array[] = '_'; } } else { $chaine_array[] = $c; } } return implode('', $chaine_array); /*$autorise='abcdefghijklmnopqrstuvwxyz0123456789-_.'; $chaine=strtolower($chaine); $chaine=str_replace(' ','',$chaine); $caractere='àáâãäåòóôõöøèéêëçìíîïùúûüÿñ'; $remplacement='aaaaaaooooooeeeeciiiiuuuuyn'; $chaine=strtr($chaine,$caractere,$remplacement); for($i=0;$i<strlen($chaine);$i++) { if(!strpos('|'.$autorise,$chaine[$i])) $chaine[$i]='_'; } return $chaine;*/ }