I have another problem here....
Our webspace provider made it so that directories in the main web dir are subdomains. so, I made a "tracker" dir, meaning that both "domain.com/tracker" and "tracker.domain.com" works. But, I dont know how to set up the upload dir.
When I choose it correctly, it chooses the url wrong.
eg. when I say the torrent folder is "tracker/torrents", it uploads the torrent correctly, but the url it adds is "tracker.domain.com/tracker/torrents/torrent.torrent"
(Should be "tracker.domain.com/torrents/torrent.torrent")
Obviously, the second "/tracker/" is wrong.
For now I have to write the url manually, but I just wanted to know if there is a solution to this...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.
Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.
I have another problem here....
Our webspace provider made it so that directories in the main web dir are subdomains. so, I made a "tracker" dir, meaning that both "domain.com/tracker" and "tracker.domain.com" works. But, I dont know how to set up the upload dir.
When I choose it correctly, it chooses the url wrong.
eg. when I say the torrent folder is "tracker/torrents", it uploads the torrent correctly, but the url it adds is "tracker.domain.com/tracker/torrents/torrent.torrent"
(Should be "tracker.domain.com/torrents/torrent.torrent")
Obviously, the second "/tracker/" is wrong.
For now I have to write the url manually, but I just wanted to know if there is a solution to this...
Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.
Look for this line:
$url = "http://" . $_SERVER["HTTP_HOST"] . "/" . $GLOBALS["torrent_folder"] . "/" . $copyFilename;
and change it to:
$url = "http://tracker.domain.com/torrents/" . $copyFilename;
That should fix it.
IGNORE that post. I had a typo in it!
Use this message instead:
Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.
Look for this line:
$url = "http://"; . $_SERVER["HTTP_HOST"] . "/" . $GLOBALS["torrent_folder"] . "/" . $copyFilename;
and change it to:
$url = "http://tracker.domain.com/torrents/" . $copyFilename;
That should fix it.
Weird, it is adding a semicolon where there shouldn't be one.
In the corrected line there should only be 1 semicolon at the end of the line, make sure when you paste the one after the URL is removed.