View Single Post
Old 03-17-2002, 06:31 PM  
redshift
Confirmed User
 
Join Date: Jan 2002
Location: anus fuckin' yo mama
Posts: 1,044
PHP Code:
<?php
srand
((double)Microtime()*1e6);
echo 
"<table width=800 >";
$index=-1;
echo  
"<tr>";
for (
$c=1;$c<=4;$c++)
{
$index++;
$urlfile=file("galleries.txt");
echo 
"<td valign=top  border=1 nowrap width=25%>";
for (
$z=0;$z<=50;$z++) #number of galleries per td
{

do{
$ru=rand(0,count($urlfile));
}
while(
strlen($urlfile[$ru])<or $saveru==$ru);
$gal=explode(",",$urlfile[$ru]);

if (
strlen($gal[0])==1)
{
$gal[0]="0".$gal[0];
}
if (
strlen($gal[2])>25)
{
$gal[2]=substr($gal[2],0,25)."...  ";
}
echo 
"<b><font color=yellow>",$gal[0]," </font></b>","<a href=/cjultra/out.php?url=",$gal[1],"&link=gal&s=70&first=1 target=\"_new\
$saveru=$ru;
}
echo "
<br></td>";
}
echo "
</tr>";



?>



this is a script that I hacked together the other night.
it randomly selects galleries and outputs them in a 4x1 table
put your url's in "galleries.txt"
in this format
12,http://www.galleryurl.com,description

I did this so I wouldn't have to update the tgp so often

Last edited by redshift; 03-17-2002 at 06:33 PM..
redshift is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote