Jump to content

AE117

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by AE117

  1. Just need to add a couple more lines so flash knows its encoding but I greatly appreciate the help. Thank You
  2. Well that is because i removed it but now its back but let me get this straight even though the page has and error but the view source shows the information the flash file will be able to read the content? Or is it going to stop my flash app from getting the data?
  3. at the moment it just goves this XML Parsing Error: junk after document element Location: http://music.eevoke.com/flash%20mp3/testxmlphp.php Line Number 3, Column 1:<player showDisplay='yes' showPlaylist='yes' autoStart='yes'> ^ but before moving the echo inside the while statement it looked like <player showDisplay="yes" showPlaylist="yes" autoStart="yes"> <song path="106" title="Ronix Ibex Wakeboard 2009 Both Sides"/> </player>
  4. [quote] include($_SERVER['DOCUMENT_ROOT'] . '/connection.php'); that will save you copy and pasting your db connection all the time, and stop you accidently posting yoru login details on a public forum, lucky your db is stored locally your problem lies with some xml your using or including elsewhere do you want to just write the information to a page or do you have formatting to it grabbed elsewhere? yea that is a good point I wasnt even thinking about it because its just testing but I see your point. I want it to be in a xml format so a flash file can use that information to populate.
  5. I did read it and that is the error I got. I moved the bracket down to enclose the echo statements and still got the error <?php header("Content-type: text/xml"); $id = "public"; $host = "localhost"; $user = "eevoke_admin2"; $pass = "3T4JI2ny2QFp"; $database = "eevoke_ostube"; $linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host."); mysql_select_db($database, $linkID) or die("Could not find database."); $query = "SELECT * FROM ost_media WHERE media_access='public'"; $resultID = mysql_query($query, $linkID) or die("Data not found."); while($r=mysql_fetch_array($resultID)) { $album=$r["media_id"]; $title=$r["media_title"]; echo "<player showDisplay='yes' showPlaylist='yes' autoStart='yes'>\n"; echo "<song path='$album' title='$title'/>"; echo "</player>\n"; } ?>
  6. Ok I did that and now i get XML Parsing Error: junk after document element Location: http://music.eevoke.com/flash%20mp3/testxmlphp.php Line Number 3, Column 1:<player showDisplay='yes' showPlaylist='yes' autoStart='yes'> ^ not sure what that means but thats what it says.
  7. Ok heres what I have <?php header("Content-type: text/xml"); $host = ""; $user = ""; $pass = ""; $database = ""; $linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host."); mysql_select_db($database, $linkID) or die("Could not find database."); $query = "SELECT * FROM ost_media WHERE media_access='public'"; $resultID = mysql_query($query, $linkID) or die("Data not found."); while($r=mysql_fetch_array($resultID)) { $album=$r["media_id"]; $title=$r["media_title"]; } echo "<player showDisplay='yes' showPlaylist='yes' autoStart='yes'>\n"; {echo "<song path='$album' title='$title'/>";} echo "</player>\n"; ?> Which gives me this xml output <player showDisplay="yes" showPlaylist="yes" autoStart="yes"> <song path="106" title="Ronix Ibex Wakeboard 2009 Both Sides"/> </player> So what I need it to do is echo more than that one song, the fetch command is saying get all those files that have public access but im only echoing one and i dont know how to echo all the results. Thank you
  8. Ok What I need is a simple php code that can output xml that looks like <?xml version="1.0" encoding="utf-8"?> <featureset> <album name="Shock Value" author="Timbaland" imageUrl="images/Timbaland/image.jpg" link="http://flabell.com/"> <song name="Oh Timbaland" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Give It To Me" duration="3 : 54" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Release" duration="2 : 48" buy="false" download="true" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="The Way I Are" duration="2 : 50" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Bounce" duration="4 : 04" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Come And Get Me" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Kill Yourself" duration="4 : 07" buy="false" download="false" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="Boardroom" duration="2 : 29" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> </album> </featureset> Heres the thing I am pulling information off of a database to fill in the fields author image url etc. In addition to that the Album will also be pulled from a database so if there is more then one album it needs to pull more info example: <?xml version="1.0" encoding="utf-8"?> <featureset> <album name="Shock Value" author="Timbaland" imageUrl="images/Timbaland/image.jpg" link="http://flabell.com/"> <song name="Oh Timbaland" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Give It To Me" duration="3 : 54" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Release" duration="2 : 48" buy="false" download="true" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="The Way I Are" duration="2 : 50" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Bounce" duration="4 : 04" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Come And Get Me" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Kill Yourself" duration="4 : 07" buy="false" download="false" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="Boardroom" duration="2 : 29" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> </album> <album2 name="Shock Value" author="Timbaland" imageUrl="images/Timbaland/image.jpg" link="http://flabell.com/"> <song name="Oh Timbaland" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Give It To Me" duration="3 : 54" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Release" duration="2 : 48" buy="false" download="true" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="The Way I Are" duration="2 : 50" buy="false" download="false" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Bounce" duration="4 : 04" buy="false" download="true" downloadSource="download/song1.mp3">songs/song1.mp3</song> <song name="Come And Get Me" duration="3 : 31" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> <song name="Kill Yourself" duration="4 : 07" buy="false" download="false" downloadSource="download/song1.mp3">songs/song3.mp3</song> <song name="Boardroom" duration="2 : 29" buy="false" download="true" downloadSource="download/song1.mp3">songs/song2.mp3</song> </album2> </featureset> I am using this php on a testing database which looks like <?php header("Content-type: text/xml"); $host = ""; $user = ""; $pass = ""; $database = ""; $linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host."); mysql_select_db($database, $linkID) or die("Could not find database."); $query = "SELECT * FROM ost_media ORDER BY media_id DESC"; $resultID = mysql_query($query, $linkID) or die("Data not found."); $xml_output .= "<featureset>\n"; for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){ $row = mysql_fetch_assoc($resultID); $xml_output .= "\t\t<date>" . $row['media_id'] . "</date>\n"; // Escaping illegal characters $row['text'] = str_replace("&", "&", $row['text']); $row['text'] = str_replace("<", "<", $row['text']); $row['text'] = str_replace(">", ">", $row['text']); $row['text'] = str_replace("\"", """, $row['text']); $xml_output .= "\t\t<title>" . $row['media_title'] . "</title>\n"; echo $test; } $xml_output .= "</featureset>"; echo $xml_output; ?> and gives the xml output <featureset> <date>106</date> <title>Ronix Ibex Wakeboard 2009 Both Sides</title> <date>105</date> <title>Ibex - Parks Bonify</title> <date>104</date> <title>Big Turbo</title> <date>103</date> <title>Suzuki Baleno</title> <date>102</date> <title>Toyota Supra</title> <date>101</date> <title>Probe vs WRX ( Probe has NOS)</title> <date>100</date> <title>93 Probe vs WRX</title> <date>99</date> <title>S2000 vs RSX-S</title> <date>98</date> </feature> I am having a problem creating an array with this that looks like the array in the first xml. Please point me in the right direction thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.