•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Web Development category of DaniWeb, a massive community of 370,585 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,985 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Web Development advertiser:
Jul 15th, 2006, 11:55 pm
So im new to the PHP world because I have to learn it for work. So one of my clients is a musician and wanted a music player so I made a simple way the user could click a link and load a song.
[PHP]<?php
$song = $_GET['song'];
echo '<a href="/jacobsite/music.php?song=Shpadoinkle.mp3">Shpadoinkle</a><br/>';
echo '<a href="/jacobsite/music.php?song=Dani_California.mp3">Dani California</a><br/>';
echo '<embed qtsrc='.$song.' height"256" width="320" src='.$song.' type="image/x-quicktime" pluginspage="[http://www.apple.com/quicktime/download/]" autoplay="true">';
?>[/PHP]
ok first I set the variable that would change inside the player which I made "$song" and the variable is retreiving the song information from the url. Then in the urls you can see I set the attribute song equal to the mp3 file I want to load.
So now the page loads and when you click a link it gets the $song data from the url. The next step is to insert it into the player where the source was I put in the variable $song. And now your users can click the links and load what ever song they like. I know it is very basic but it gives the user more control over the quicktime player that you would normally need to use a flash player for.
[PHP]<?php
$song = $_GET['song'];
echo '<a href="/jacobsite/music.php?song=Shpadoinkle.mp3">Shpadoinkle</a><br/>';
echo '<a href="/jacobsite/music.php?song=Dani_California.mp3">Dani California</a><br/>';
echo '<embed qtsrc='.$song.' height"256" width="320" src='.$song.' type="image/x-quicktime" pluginspage="[http://www.apple.com/quicktime/download/]" autoplay="true">';
?>[/PHP]
ok first I set the variable that would change inside the player which I made "$song" and the variable is retreiving the song information from the url. Then in the urls you can see I set the attribute song equal to the mp3 file I want to load.
So now the page loads and when you click a link it gets the $song data from the url. The next step is to insert it into the player where the source was I put in the variable $song. And now your users can click the links and load what ever song they like. I know it is very basic but it gives the user more control over the quicktime player that you would normally need to use a flash player for.
This blog entry was written by mikeandike22. It has received 1,763 views, 0 comments, and 7 linkbacks. 1 voter has rated this entry 5 out of 5 stars.
•
•
•
•
advertising apple blog browser business daniweb dell development economy email facebook firefox gaming google hacking hardware ibm intel internet iphone ipod itunes linux mac malware marketing microsoft mobile mozilla mp3 music news open source privacy search security server software sony spam stocks technology ubuntu video vista web windows yahoo youtube
All Recent Tags Post Comment
•
•
•
•
Only community members can start a blog or comment on blog entries. You must register or log in to contribute.
•
•
•
•
•
•
•
•
DaniWeb Web Development Marketplace
Related Blog Entries
- ISO Uses PDFs Too, Standardizes Format (17 Days Ago)
- Microsoft announces host of new Internet Explorer 8 security features (17 Days Ago)
- Latest Mac OS X Trojan Might Be Sign of Things to Come (19 Days Ago)
- Yahoo Mail Open—then Closed—to Hackers (23 Days Ago)
- Barack Obama is following me on Twitter! (24 Days Ago)
- Salesforce Says ‘Hey, Google, Get Onto My Cloud’ (26 Days Ago)
- Web forms are still the gateway to security hell (28 Days Ago)
- Ruby, Ruby, Ruby - Vulnerable, Vulnerable, Vulnerable (28 Days Ago)
- No Flash Required: SproutCore Project For Rich Browser Apps (31 Days Ago)
- EBay, PayPal Pal up Further With Developers (33 Days Ago)
Related Forum Threads
- it's simple but yet complicated...php and mysql search.. (PHP)
- PHP and MySQL newbie introducing self (PHP)
- installing php admin in dreamweaver? (MySQL)
- Getting info from an XML file (PHP)
- SQL and PHP database ??? (MySQL)
- Help with PHP and checkboxes (PHP)
- Installation of PHP on Windows (PHP)
- PHP question i think! (Site Layout and Usability)