Problem with the OGG link

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Problem with the OGG link

Post by Jza » Thu Sep 28, 2006 10:16 am

I found issues triying to download the Ogg file for yesterday's show.
Alexandro COLORADO

User avatar
Patrick
Site Admin
Posts: 2519
Joined: Tue Apr 27, 2004 11:38 am
Location: Easton, PA
Contact:

Post by Patrick » Thu Sep 28, 2006 10:36 am

How are you trying to download the file? Manually? There may be an issue with a particular mirror. Try it a couple times. Each time it will go to the next mirror.
Ego contemno licentia

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Thu Sep 28, 2006 10:49 am

I see thanks for the tech support.
Alexandro COLORADO

User avatar
Patrick
Site Admin
Posts: 2519
Joined: Tue Apr 27, 2004 11:38 am
Location: Easton, PA
Contact:

Post by Patrick » Thu Sep 28, 2006 10:51 am

Jza wrote:I see thanks for the tech support.
You're welcome!
Ego contemno licentia

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Fri Sep 29, 2006 3:40 pm

hey pat can you open me the source for the randomizer, I am looking for a randomizer script for the OOo site so we dont have users scrolling down throught he mirror list. Thanks.
Alexandro COLORADO

User avatar
Gomer_X
Posts: 901
Joined: Fri Jun 03, 2005 1:31 pm
Location: Cincinnati, Ohio, USA
Contact:

Post by Gomer_X » Tue Oct 03, 2006 8:48 am

Jza wrote:hey pat can you open me the source for the randomizer, I am looking for a randomizer script for the OOo site so we dont have users scrolling down throught he mirror list. Thanks.
Linc wrote the PHP for the mirror script. Generally it's a bad idea to open the code to an internet facing script unless you've had sufficient time to test it for security.

If you ask nice Linc might tell you what PHP function he used to pick a random mirror.

User avatar
Linc
Site Admin
Posts: 345
Joined: Mon Apr 26, 2004 11:54 pm
Contact:

Post by Linc » Tue Oct 03, 2006 10:18 am

Gomer_X wrote:
Jza wrote:hey pat can you open me the source for the randomizer, I am looking for a randomizer script for the OOo site so we dont have users scrolling down throught he mirror list. Thanks.
Linc wrote the PHP for the mirror script. Generally it's a bad idea to open the code to an internet facing script unless you've had sufficient time to test it for security.

If you ask nice Linc might tell you what PHP function he used to pick a random mirror.
The majority of it looks like this:

Code: Select all

<?
if(!isset($_GET['fname'])) { header("Location: http://tllts.org"); exit; }
$fname=$_GET['fname'];

$db = mysql_connect("$host", "$username", "$password");
mysql_select_db("$database",$db);
$query = "select link from mirror where link like '%$fname%'";
$result = mysql_query($query,$db) or die(mysql_error());
$recs = mysql_num_rows($result);
$counter='0';
while ($myrow = mysql_fetch_array($result))
        {
        $counter++;
        $link[$counter]=$myrow['link'];
        }

srand((double)microtime()*1000000); 
$mirrorno=rand(0,$recs);
if ($mirrorno=='0')
        {
        $query = "select link from audio where link like '%$fname%'";
        $result = mysql_query($query,$db) or die(mysql_error());
        while ($myrow = mysql_fetch_array($result))
                {
                $link[$counter]=$myrow['link'];
                }
        }

header("Location: $link[$mirrorno]");
?>
Basically, there is a table that holds the links of all the shows that are hosted on a mirror. The script queries that table for all the url's with that show and randomly picks one of them and redirects to that mirror.
-Linc Fessenden

In the Beginning there was nothing, which exploded - Yeah right...

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Tue Oct 03, 2006 11:18 pm

Great, thanks.
Alexandro COLORADO

Post Reply