The tracker's announce url is h = ?

Started by Hyperion (noobKID), July 31, 2012, 06:02:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hyperion (noobKID)

#9
Hello again, this is weird, and i do not know why i did not just looked at it earlier...

i think i have finded the error...
look here at my upload.php:

Code (php) Select
<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
require_once "include/bittorrent.php";
require_once 
"include/user_functions.php";
require_once 
"include/html_functions.php";

dbconn(false);

loggedinorreturn();

    
$lang array_mergeload_language('global'), load_language('upload') );
    
    
$HTMLOUT '';

    if (
$CURUSER['class'] < UC_UPLOADER)
    {
        
stderr($lang['upload_sorry'], $lang['upload_no_auth']);
    }


    
$HTMLOUT .= "<div align='center'>
    <form enctype='multipart/form-data' action='takeupload.php' method='post'>
    <input type='hidden' name='MAX_FILE_SIZE' value='
{$TBDEV['max_torrent_size']}' />
    <p>
{$lang['upload_announce_url']} <b>{$TBDEV['announce_urls'][0]}</b></p>";


    
$HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='10'>
    <tr>
      <td class='heading' valign='top' align='right'>
{$lang['upload_torrent']}</td>
      <td valign='top' align='left'><input type='file' name='file' size='80' /></td>
    </tr>
    <tr>
      <td class='heading' valign='top' align='right'>
{$lang['upload_name']}</td>
      <td valign='top' align='left'><input type='text' name='name' size='80' /><br />(
{$lang['upload_filename']})</td>
    </tr>
    <tr>
      <td class='heading' valign='top' align='right'>
{$lang['upload_nfo']}</td>
      <td valign='top' align='left'><input type='file' name='nfo' size='80' /><br />(
{$lang['upload_nfo_info']})</td>
    </tr>
    <tr>
      <td class='heading' valign='top' align='right'>
{$lang['upload_description']}</td>
      <td valign='top' align='left'><textarea name='descr' rows='10' cols='80'></textarea>
      <br />(
{$lang['upload_html_bbcode']})</td>
    </tr>"
;

    
$s "<select name='type'>\n<option value='0'>({$lang['upload_choose_one']})</option>\n";

    
$cats genrelist();
    
    foreach (
$cats as $row)
    {
      
$s .= "<option value='{$row["id"]}'>" htmlspecialchars($row["name"]) . "</option>\n";
    }
    
    
$s .= "</select>\n";
    
    
$HTMLOUT .= "<tr>
        <td class='heading' valign='top' align='right'>
{$lang['upload_type']}</td>
        <td valign='top' align='left'>
$s</td>
      </tr>
      <tr>
        <td align='center' colspan='2'><input type='submit' class='btn' value='
{$lang['upload_submit']}' /></td>
      </tr>
    </table>
    </form>
    </div>"
;

////////////////////////// HTML OUTPUT //////////////////////////

    
print stdhead($lang['upload_stdhead']) . $HTMLOUT stdfoot();

?>



notice the place where it should get out?...
after the array, there is this ([0])...
so it will only show the first letter in the whole line hehe  :o...

so if i am removing it, then it will show it... but here appear an another problem that i do not know why appears.

it does not shows the first one as it is suppose to, but it is taking the very last and showing it like so:

http://domain.com:83/announce.php

when it is supposed to show like this:

http://blackbitt.com/announce.php

ideas now? :P...

Hyperion (noobKID)

#8
i see the idea now... thanks...

EDIT:
just one more question, i have now edited it like you told me to.
and still not showing up on upload.php... still only the (h)...

you can all test here: www.speed-scene.com/personal_sites/tb

that is my site...
ideas?...

tspaul

In the config.php you have this: $TBDEV['announce_urls'][] = "http://localhost/TB_ALPHA/announce.php";
Localhost is only used for internal testing.
http://blackbitt.com/TB_ALPHA/announce.php"; need to be in config.
and add this to announce.php.



rickandmary

it looks to me like your announce and baseurl have 2 different paths

Hyperion (noobKID)

lol... i just told you what i allready had, and asked on how to fix... lol haha ^^'...

anyways... any other ideas?... or do i really need to write the whole damn thing down manually? :P....

tspaul

That possible works, test it out you will see if it announce correct on upload.

Hyperion (noobKID)

does it needs to be like that?...

just that i am using this:

Code (php) Select
#
$TBDEV['baseurl'] = "http://" . $_SERVER["HTTP_HOST"]."/personal_sites/tb";


and then it should get the site-URL, and then i hould just put the sub-url in the last like i did in the end here...

does that not just doing the work?...

tspaul

Have you edit the announce.php it need to have the announce setting at the top.
////////////////// GLOBAL VARIABLES ////////////////////////////   
$TBDEV['baseurl'] = 'http://www.youre tbdev site/';
$TBDEV['announce_interval'] = 60 * 30;

Hyperion (noobKID)

hello again (U) people.
before tbdev went down, i managed to download their latest version/release.

and when i am looking at the upload page, then im only getting this:

The tracker's announce url is h

in the area where it should show up the real announce, instead of just the (h) tag....

ideas?...

here is my config.php file:

Code (php) Select
<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
error_reporting(E_ALL);

define('SQL_DEBUG'2);

/* Compare php version for date/time stuff etc! */
if (version_compare(PHP_VERSION"5.1.0RC1"">="))
date_default_timezone_set('Europe/London');


define('TIME_NOW'time());

$TBDEV['time_adjust'] =  0;
$TBDEV['time_offset'] = '0'
$TBDEV['time_use_relative'] = 1;
$TBDEV['time_use_relative_format'] = '{--}, h:i A';
$TBDEV['time_joined'] = 'j-F y';
$TBDEV['time_short'] = 'jS F Y - h:i A';
$TBDEV['time_long'] = 'M j Y, h:i A';
$TBDEV['time_tiny'] = '';
$TBDEV['time_date'] = '';


                  
$TBDEV['site_online'] = 1;
$TBDEV['tracker_post_key'] = 'changethisorelse';
$TBDEV['max_torrent_size'] = 1000000;
$TBDEV['announce_interval'] = 60 30;
$TBDEV['signup_timeout'] = 86400 3;
$TBDEV['minvotes'] = 1;
$TBDEV['max_dead_torrent_time'] = 3600;

// Max users on site
$TBDEV['maxusers'] = 5000// LoL Who we kiddin' here?


if ( strtouppersubstr(PHP_OS03) ) == 'WIN' )
  {
    
$file_path str_replace"\\""/"dirname(__FILE__) );
    
$file_path str_replace"/include"""$file_path );
  }
  else
  {
    
$file_path dirname(__FILE__);
    
$file_path str_replace"/include"""$file_path );
  }
  
define('ROOT_PATH'$file_path);
$TBDEV['torrent_dir'] = ROOT_PATH '/torrents'# must be writable for httpd user   

# the first one will be displayed on the pages
$TBDEV['announce_urls'] = array();
$TBDEV['announce_urls'][] = "http://localhost/TB_ALPHA/announce.php";
//$TBDEV['announce_urls'] = "http://localhost:2710/announce";
$TBDEV['announce_urls'] = "http://domain.com:83/announce.php";

if (
$_SERVER["HTTP_HOST"] == "")
  
$_SERVER["HTTP_HOST"] = $_SERVER["SERVER_NAME"];
  
$TBDEV['baseurl'] = "http://" $_SERVER["HTTP_HOST"]."/personal_sites/tb";






/** settings **/
$TBDEV['reports']      = 0;// 1/0 on/off
$TBDEV['karma']        = 0;// 1/0 on/off
$TBDEV['textbbcode']   = 0;// 1/0 on/off





/*
## DO NOT UNCOMMENT THIS: IT'S FOR LATER USE!
$host = getenv( 'SERVER_NAME' );
$script = getenv( 'SCRIPT_NAME' );
$script = str_replace( "\\", "/", $script );

  if( $host AND $script )
  {
    $script = str_replace( '/index.php', '', $script );

    $TBDEV['baseurl'] = "http://{$host}{$script}";
  }
*/

//set this to true to make this a tracker that only registered users may use
//$TBDEV['membersonly'] = 1; //deprecated no longer needed

//maximum number of peers (seeders+leechers) allowed before torrents starts to be deleted to make room...
//set this to something high if you don't require this feature
$TBDEV['peerlimit'] = 30000//deprecated. no longer used.

// Email for sender/return path.
$TBDEV['site_email'] = "noreply@speed-scene.com";

$TBDEV['site_name'] = "bLACKbITT.COM";

$TBDEV['language'] = 'en';
//charset
$TBDEV['char_set'] = 'UTF-8'//also to be used site wide in meta tags
if (ini_get('default_charset') != $TBDEV['char_set']) {
ini_set('default_charset',$TBDEV['char_set']);
}
$TBDEV['msg_alert'] = 0// saves a query when off

$TBDEV['autoclean_interval'] = 900;
$TBDEV['sql_error_log'] = ROOT_PATH.'/logs/sql_err_'.date("M_D_Y").'.log';
$TBDEV['pic_base_url'] = "./pic/";
$TBDEV['stylesheet'] = "./1.css";
$TBDEV['readpost_expiry'] = 14*86400// 14 days
//set this to size of user avatars
$TBDEV['av_img_height'] = 100;
$TBDEV['av_img_width'] = 100;
$TBDEV['allowed_ext'] = array('image/gif''image/png''image/jpeg');
// Set this to the line break character sequence of your system
//$TBDEV['linebreak'] = "\r\n"; // not used at present.

define ('UC_USER'0);
define ('UC_POWER_USER'1);
define ('UC_VIP'2);
define ('UC_UPLOADER'3);
define ('UC_MODERATOR'4);
define ('UC_ADMINISTRATOR'5);
define ('UC_SYSOP'6);

//Do not modify -- versioning system
//This will help identify code for support issues at tbdev.net
define ('TBVERSION','TBDev_2009_svn');

?>


ideas?...