Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member estes53's Avatar
    Join Date
    May 2007
    Location
    Colombia
    Posts
    7
    Member #
    15258
    My hope is that the problem is in formatting, but am afraid that I am attempting something that is impossible.

    I am trying to pull a wave/riff file from mysql and make it playable.

    Code-

    $query = 'SELECT `easy1_a_v`.`sound`
    FROM easy1_a_v
    ORDER BY `easy1_a_v`.`newlang` ASC';
    $result = mysql_query($query) or die('Query failed: ' . mysql_error());

    echo "<CENTER><H1><table BORDER=\"4\" CELLPADDING=\"2\" CELLSPACING=\"2\" WIDTH=\"50%\">\n";
    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "\t<tr>\n";
    foreach ($line as $col_value) {
    echo "\t\t<td><embed src=($col_value)
    width=\"200\" height=\"240\" href=(col_value) target=\"quicktimeplayer\"></td>\n";
    }
    echo "\t</tr>\n";
    }
    echo "</table></H1></CENTER>\n";

    Result-

    <Big empty space where the audio player icon would normally be>...

    ...??WAVEfmt???U?[1]?]...

    ...<a lot of RIFF (BLOB from mysql) code>...

    ...) width="200" height="240" href=(col_value) target="quicktimeplayer">

    Thanx, Alan

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    It's possible, but not like that. Instead, what you want to do is create a separate page that reads from MySQL and prints the data directly. Before printing the data, you'll want to send the header [minicode]Content-Type[/minicode] with the appropriate MIME type (I think for Quicktime it would be sound/x-quicktime-audio, but I may be completely wrong). Then send all the data. Then in your page do the embed, but refer to that other PHP file.

  4. #3
    Junior Member estes53's Avatar
    Join Date
    May 2007
    Location
    Colombia
    Posts
    7
    Member #
    15258
    How about Java?

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Java? What do you mean?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com