k.... i have this php script for anti leeching and listing, but i want to modify it so it can link to other servers... like if the files are on my ftp server, but the script is on another, if you guys could help out.... thanks =)
<?
//if ( isset($HTTP_GET_VARS['folder']) )
//{
// $dl_folder = strval($HTTP_GET_VARS['folder']);
//}
//else
{
$dl_folder = 'here goes the folder, its always relative to the root.... i want it not to be mehh';
}
////////////////////////////////////////////////////////////////
// Grab directory listings for diplay //
////////////////////////////////////////////////////////////////
$base = $dl_folder."/";
$iFilelistCount=0;
if(is_dir($base)) {
$dh = opendir($base);
while (false !== ($entry = readdir($dh))) {
if ( strlen($entry) > 4 && !is_dir($base . $entry) ){
if ( strstr(strtolower($entry), '.mp3') ){
$iFilelistCount++;
$FileList[$iFilelistCount]=$entry; //unedited filename list
}
}
}
closedir($dh);
}
function FilenameStripper ( $str ){
return str_replace( "_", " ", substr($str,0,strlen($str)-4) ); //used strip the filenames
}
////////////////////////////////////////////////////////////////
// display title
print "<span class=\"texttitle\">".$dl_folder."</span><hr>";
// display list
for ($i=1;$i<=count($FileList);$i++)
print "<a href=\"no-leech.php?folder=".$dl_folder."&file=".$FileList[$i]."\">".FilenameStripper($FileList[$i])."</a><br>";
// trailer
print "<hr><p align=\"right\"><b>End of list</b>";
?>