FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


VERY simple php script needed





warallthetm
Code:

<?php

/*
This is a sample file that extracts a list of records from a mysql database and
builds a playlist from it. After looking through this file, you'll probably
'get the idea' and'll be able to connect the flash player
to your own database.
*/


// first connect to database
$dbcnx = @mysql_connect("localhost","USERNAME","PASSWORD");
$dbselect = @mysql_select_db("DATABASE");
if ((!$dbcnx) || (!$dbselect)) { echo "Can't connect to database"; }


// next, query for a list of titles, files and links.
$query = "SELECT title,file,link FROM mp3_table";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());


// third, the playlist is built in an xspf format
// we'll first add an xml header and the opening tags ..
header("content-type:text/xml;charset=utf-8");

echo "<playlist version='1' xmlns='http://xspf.org/ns/0/'>\n";
echo "   <title>Sample PHP Generated Playlist</title>\n";
echo "   <info>http://www.jeroenwijering.com/</info>\n";
echo "   <trackList>\n";

// .. then we loop through the mysql array ..
while($row = @mysql_fetch_array($result)) {
   echo "      <track>\n";
   echo "         <title>".$row['title']."</title>\n";
   echo "         <creator>".$row['author']."</creator>\n";
   echo "         <location>".$row['file']."</location>\n";
   echo "         <info>".$row['link']."</info>\n";
   echo "         <image>".$row['thumbnail']."</image>\n";
   echo "      </track>\n";
}
 
// .. and last we add the closing tags
echo "   </trackList>\n";
echo "</playlist>\n";


/*
That's it! You can feed this playlist to the SWF by setting this as it's 'file'
parameter in your HTML.
*/

?>


Ok, i need someone to modify the above code for me, and create an admin panel. Example what i need it to do:
I have a flash video player, and it play the xml file. Each video will be broken up into a few parts. So i need a varible in the url, and for each variable a new set up videos appear.

So if i want to watch "tv show 1" my flash would look like:
<embed "player.swf " xml="phpsscript.php?video=tvshow1 />
And i need a simple admin interface where i can add video.

I pay good, even better when its asap
abhinavm24
if you still need the coding done drop in a pm.
I am willing to complete the code.
Laughing
Related topics
Simple PHP forum code needed!
Running a "Hello World" php script
Simple PHP script not working
I need a VERY simple php script
PHP Script needed
another simple php request
I need a php upload script, NEEDED BADLY
Preventing bad PHP script calls
30frih for a php rotator script
affiliate tracking php script needed
PHP Script Needed for 250 frih$
How to build simple PHP upload form
php script for Changing file permissions & owner
need help in a simple php register script based on flat file
Reply to topic    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.