I've almost got this working, expect that I'm not sending the correct
"Content-type" header to the RealPlayer player. I've followed a tutorial
from the O'Reilly network (
http://www.onlamp.com/pub/a/php/2000/09/15/php_mysql.html?page=1 ), and
modified it for an Access database, and RealPlayer content.

I click on a hyperlink in the table, thus initilizing the "download" script.
RealPlayer opens up, then says it can't identify what I'm trying to play and
will try and find a plugin for it, then the search for the plugin fails.

The current content type header reads

  header("Content-type: application/vnd.rn-realmedia");

Does anybody have any clue what type RealPlayer might identify? Here's my
code for the download script.
 if ($id) {
  include "talks.php.inc";        // This is the include file, I just named
it differently from the tutorial

  $sql = "SELECT * FROM tblTalks WHERE TalksID=$id";
  $cursor = odbc_exec($db_talks, $sql);
  $data = odbc_result($cursor, "fldBinData");
  $name = odbc_result($cursor, "fldFileName");
  $title = odbc_result($cursor, "fldTitle");
  $summery = odbc_result($cursor, "fldSummery");

  header("Content-type: application/vnd.rn-realmedia");
  header("Content-Disposition: stream; filename=$name");
  header("Content-Description: Speeches from Barry");
  echo $data;

Here is the source for the include file

 /* talks.php.inc */
/* Note that I left out the "or die" parts out (in the $db_talks and $sql),
they were very long, and would make the code unreadable here */

 $db_talks = odbc_connect("TalksDatabase", root, '');

 function make_query($query) {
  global $db_talks;
  $sql = odbc_exec($db_talks, $query);
  return $sql;

Thanks for any help you peeps can give me.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to