how about making a page called:
redirect.php?lid=###
that actually query's the db and prints out content type and also the url of the rm.
do this:
<?php
// redirect.php?lid=####
require_once "db.class.php";
$db = new DB("login","pass","dbname");
$db->query("SELECT url,clickthru FROM rm_links WHERE lid = '$lid'");
if( $db->fetchRow() )
{
$clickthru = intval($db->record["clickthru"]) + 1;
$url = $db->record["url"];
$db->query("UPDATE rm_links SET clickthru='$clickthru' WHERE lid = '$lid'");
Header("Location: $url");
}
$db->disconnect();
?>
now what that file does is that it opens the db and looks for the link id (lid), and selects the url and clickthru (for keeping track of number of times a link has been hit), anyways it increments that value and redirects. But according to what you said, it might be beneficial to actually make that:
//change the line:
Header("Location: $url");
//to the following two lines
Header("Content-type: audio/x-pn-realaudio");
print $url;
also, you can put in code that checks to see where the referer is coming from and block them out or take them back to the main page or whatever.
and thats it. you're done.
oh by the way, the db.class.php file is just a db wrapper class the i downloaded from the PHP classes repository, http://phpclasses.upperdesign.com/browse.html go into Databases > DB > download
but you do not need it to do anything, you can just use mysql_connect(), mysql_fetchrow(), mysql_query(), ... instead.
I hope that helped you.