Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

error - php for creating xml of my mysql data

20 replies [Last post]

i am using php for creating xml for my flash player, but it works fine in firefox, but giving error(can't find xml file) error in internet explorer. i am using a php

<?php
$fid = $_GET['id'];
$db_name = "musicq"; //mysql name
$db_host = "localhost"; //mysql host
$db_user = "musicq"; //mysql user
$db_pass = "musicq"; //mysql password
mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$result = mysql_query("SELECT * FROM mp3 WHERE id LIKE '$fid'");
while($r=mysql_fetch_array($result))
{
$album=$r["album"];
$date=$r["date"];
$artist=$r["artist"];
$user=$r["user"];
$category=$r["category"];
$id=$r["id"];
$img=$r["img"];
$text1=$r["text1"];
$link1=$r["link1"];
$text2=$r["text2"];
$link2=$r["link2"];
$text3=$r["text3"];
$link3=$r["link3"];
$text4=$r["text4"];
$link4=$r["link4"];
$text5=$r["text5"];
$link5=$r["link5"];
$text6=$r["text6"];
$link6=$r["link6"];
$text7=$r["text7"];
$link7=$r["link7"];
$text8=$r["text8"];
$link8=$r["link8"];
$text9=$r["text9"];
$link9=$r["link9"];
$text10=$r["text10"];
$link10=$r["link10"];
$text11=$r["text11"];
$link11=$r["link11"];
$text12=$r["text12"];
$link12=$r["link12"];
$text13=$r["text13"];
$link13=$r["link13"];
$text14=$r["text14"];
$link14=$r["link14"];
$text15=$r["text15"];
$link15=$r["link15"];
}
?>
<?
header("content-type:text/xml;charset=utf-8");
echo "<player showDisplay='yes' showPlaylist='yes' autoStart='yes'>\n";
{echo "<song path='$link1' title='$text1'/>";}
{echo "<song path='$link2' title='$text2'/>";}
{echo "<song path='$link3' title='$text3'/>";}
{echo "<song path='$link4' title='$text4'/>";}
{echo "<song path='$link5' title='$text5'/>";}
{echo "<song path='$link6' title='$text6'/>";}
{echo "<song path='$link7' title='$text7'/>";}
{echo "<song path='$link8' title='$text8'/>";}
{echo "<song path='$link9' title='$text9'/>";}
{echo "<song path='$link10' title='$text10'/>";}
{echo "<song path='$link11' title='$text11'/>";}
{echo "<song path='$link12' title='$text12'/>";}
{echo "<song path='$link13' title='$text13'/>";}
{echo "<song path='$link14' title='$text14'/>";}
{echo "<song path='$link15' title='$text15'/>";}
echo "</player>\n";
?>

it gets id from a url in get mode.
script live at :-
http://www.rdxzone.mobi/flisten.php?id=2

at this url it works fine at firefox,

but when browse in internet explorer it gives error (can't fine xml)

now about xml:-
this is the url of php to xml file.when user call for play the songs, call to this ( mp3player.swf?playlist=testplay.php?fid=2)

php to xml file url

http://www.rdxzone.mobi/testplay.php?fid=2 (works,open fine at firefox and internt explorer.)

the error is that xml loads fines at firefox but not in IE.
xml format is correct as per i get in flash player pack.
how can i remove this error

@suri,

Maybe it's because Internet explorer requires a different form of the object element:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
<param name="movie" value="myContent.swf" />
Details here: http://code.google.com/p/swfobject/wiki/documentation Scroll down a bit to where they give examples of the double object code.

i am using this one

<object type="application/x-shockwave-flash" data="mp3player.swf?playlist=testplay.php?fid=<?=$id?>" width="270" height="280" wmode="transparent">
<param name="movie" value="mp3player.swf" />
<param name="wmode" value="transparent" />

please tell what can i add in this so that it works

@suri,

Go to the link that I posted above.

Scroll down to:

How to embed Flash Player content using SWFObject static publishing
STEP 1: Embed both Flash content and alternative content using standards compliant markup

There is an example of the double object method for both Internet Explorer and all other browsers.

yah i add first step

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="270" height="280"><object type="application/x-shockwave-flash" data="mp3player.swf?playlist=testplay.php?fid=<?=$id?>" width="270" height="280" wmode="transparent">
<param name="movie" value="mp3player.swf" />
<param name="wmode" value="transparent" />
</object></object>

but now it doesnot show player but continously loads somrtime.

one thing i more see that
if we place this url direct to IE It plays
/mp3player.swf?playlist=testplay.php?fid=2

but when i add it into page it gives error that xml file not found

@suri,

You need the conditionals so that Internet Explorer doesn't see the inner object element.

Somethng more like this:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="270" height="280">
  <param name="movie" value="mp3player.swf?playlist=testplay.php?fid=<?=$id?" />
  <param name="wmode" value="transparent" />
  <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="mp3player.swf?playlist=testplay.php?fid=<?=$id?>" width="270" height="280">
      <param name="wmode" value="transparent" />
    </object>
  <!--<![endif]-->
</object>

please donot go i just check it and upload the page again and reply you

wohhhhhhhhhhhhh !!!!!!!!
its starts working in IE i am very thankful to you for solving this problem.

thanks thanks thanks thanks thanks

@suri,

You're welcome. Enjoy.....

Another example here: http://www.jeroenwijering.com/?thread=10045#msg78204

Scroll down a bit towards the end of the second code block and you can see the double object code.

Is this only a problem in certain instances or is it a basic problem with using IE.

If it's only certain instances.. do we know what the triggers or combination of content is which triggers the problem?

Anyway, I've just spent the last 3 hours trying to follow the examples given here, but still cant' quite get it.

This is my original code.... could someone tell me how the new code should look so it'll work in IE?

<script type="text/javascript"
src="swfobject.js"></script>
<script type="text/javascript">

var s1 = new SWFObject("player.swf","ply","428","340","9","#FFFFFF");

s1.addParam("allowfullscreen","true");

s1.addParam("allowscriptaccess","always");

s1.addParam("flashvars","file=http://www.macgyveronline.com/videos/video1.flv&&volume=40");

s1.write("container");

</script>

For IE, this next line has to be on one continuous line:<script type="text/javascript" src="swfobject.js"></script>
Then you need a container element before the JavaScript code for the player:

<div id="container" class="container">
<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this video.</a>
</div>

And then the rest of your code:
<script type="text/javascript">
var s1 = new SWFObject("player.swf","ply","428","340","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=http://www.macgyveronline.com/videos/video1.flv&volume=40");
s1.write("container");
</script>
Use only one concatenation operator "&" between each flashvar.

Thank you! Very much appreciated.

Looks like that new code works for everyone except me.

I just got someone else to test in IE and it worked for them, but my IE doesn't want to work for some reason. Might have to try a reboot or something.

Anyway, thank you again.

In Opera after installing/updating Adobe Flash for Firefox Opera ...on file menu go to "Tools", then "Preferences" then "Advanced" then "Content" and chech "enable plug in's' to allow Adobe Flash to work
or check the "enable plug in's' in "Tools "quick preferences" if there

Hi,

I have a similar problem and I can't get around it.

This code works fine in Firefox (plays both movies with navigation arrows in player). But it only plays the first movie in internet explorer. I think this has to do with the vertical bar | used as a seperator. But I don't know how to fix it.

<!-- START: FILMTRAILER.COM FLASH PLAYER version 3.3 -->
<object width="400" height="225">
<param name="movie" value="http://www.player.filmtrailer.com/v3.3/player.swf?file=http://uk.player-feed.filmtrailer.com/v2.0/cinema/1508|1511/?channel_user_id=441100227-1&default_quality=xlarge&volume=35"></param>
<embed type="application/x-shockwave-flash" src="http://www.player.filmtrailer.com/v3.3/player.swf?file=http://uk.player-feed.filmtrailer.com/v2.0/cinema/1508|1511/?channel_user_id=441100227-1&default_quality=xlarge&volume=35" allowFullScreen="true" width="400" height="225"></embed>
</object><br/> <a style="font-family: verdana; color:cccccc; font-size:
8pt; text-decoration:none" alt="filmtrailer.com" target="_blank" href="http://uk.filmtrailer.com/">Film Trailers by Filmtrailer.com</a>
<!-- END: Provided by filmtrailer.com -->

Help, please.

Chris

Does anyone can tell me where can I get the flisten php script?

thanks

hi any one help me please

java script for pic gallery is not working properly in IE but woks it fire fox the alignment is not good. and also the picture should not e be moved....

Hi could anyone help me wiht my code. Its not appearing in IE. The codes are:

<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','name','homeflash','width','736','height','170','id','homeflash','src','media/Head00','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','bgcolor','#000000','movie','media/Head00' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="homeflash" width="736" height="170" id="homeflash">
<param name="movie" value="media/Head00.swf">
<param name="quality" value="high"><param name="BGCOLOR" value="#000000">
<embed src="media/Head00.swf" width="736" height="170" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="homeflash" bgcolor="#000000"></embed></object></noscript></td>
</tr>

Thanks

@looponline - Can you provide a link to where you are running this?

For me, I couldn't get the Vimeo Video to work in IE8 until I got rid of the script code preceding the <object>. Checking out the code on Vimeo's blog helped me out:

http://vimeo.com/forums/topic:3148

All you need is this:

<object type="application/x-shockwave-flash" data="http://vimeo.com/moogaloop.swf" width="460" height="337">
<param name="allowscriptaccess" value="always" />
<param name="allowfullscreen" value="true" />
<param name="movie" value="http://vimeo.com/moogaloop.swf" />
<param name="flashvars" value="clip_id=10430009&fullscreen=1&server=vimeo.com&show_byline=1&show_portrait=1&show_title=1" />
</object>

Try stripping out the AC script info you have above the object if you still can't see the videos in IE.

actually, here is the link to the Vimeo Blog - whoops:
http://vimeo.tumblr.com/

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic).

More information about formatting options