FieldsRequest(array('id','name','md5')); $mysql->QueryRequest("SELECT * FROM torrentdb WHERE md5='{$torrent['info']['md5sum']}' LIMIT 1"); if($mysql->outputfields['md5'][0] == $torrent['info']['md5sum']){ $template['error'] = "Oops!, the file that you are trying to upload already exist in out database under the name outputfields['md5'][0]}\">{$mysql->outputfields['name'][0]}.torrent."; }else{ $torrent['scrape'] = str_replace('/announce', '/scrape', $torrent['announce']); $torrent['magnet'] = strtoupper(sha1(BEncode($torrent['info']))); $torrent['info']['private'] = ($torrent['info']['private']) ? 1 : 0; $torrent['multi'] = (isset($torrent['info']['files'])) ? 1 : 0; $torrent['info']['files'] = serialize($torrent['info']['files']); $torrent['hash'] = base64_encode($torrent['hash']); $mysql = new MySql; $mysql->QueryDebug("INSERT INTO torrentdb ( filename, hash, description, tags, announce, scrape, magnet, creation, comment, created_w, created_b, encoding, seedurl, md5, sha1, internal_name, multifile, files, private, f_size, p_size, t_size, source, category ) VALUES ( '{$torrent['filename']}', '{$torrent['hash']}', '{$torrent['description']}', '{$torrent['tags']}', '{$torrent['announce']}', '{$torrent['scrape']}', '{$torrent['magnet']}', '{$torrent['creation date']}', '{$torrent['comment']}', '{$torrent['created by']}', '{$torrent['user-agent']}', '{$torrent['encoding']}', '{$torrent['httpseeds']}', '{$torrent['info']['md5sum']}', '{$torrent['info']['sha1']}', '{$torrent['info']['name']}', '{$torrent['multi']}', '{$torrent['info']['files']}', '{$torrent['info']['private']}', '{$torrent['info']['length']}', '{$torrent['info']['piece length']}', '{$torrent['size']}', '{$torrent['info']['source']}', '{$torrent['category']}' );"); $template['success'] = "{$torrent['name']}.torrent Succesfully uploaded!"; $mysql->Query("OPTIMIZE TABLE torrents"); } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } } ?>
Torrent:

Description:


Tags: Seperate each Tag with a comma.