Hi all,
Sorry if this is an FAQ. I read thru a few threads here...someone is
actually doing something similar to me with displaying videos. I have
code that works in Safari on my Mac but it doesn't work on the iPhone.
My first page reads mysql db and gets a list of 5 movie files, this
works fine. Each item in the list has a dynamic URL to call a PHP
file. That PHP file then calls QT_WriteOBJECT in order to display an
MPEG4 movie.
If I hard code all the parms in the URL for QT_WriteOBJECT it works
fine. If I try to use php echo to fill in parms I get a blank page on
the iPhone.
Here is my PHP file:
<?php
require('includes/links.php');
$uid = $_REQUEST['uid'];
$mid = $_REQUEST['mid'];
$sql = "SELECT * FROM ".$cfg['DB_MEDIA']." WHERE m_id='".$mid."'";
$res = $mycms->sql_query($sql);
$row = $mycms->sql_fetchrow($res);
$mov_size = explode("X", $row['size']);
?>
<html>
<head>
<title>MyPlayer 1.05</title>
<script src="scripts/AC_QuickTime.js"
language="JavaScript" type="text/javascript">
</script>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<!-- media Player -->
<div name="hfpage">
<script language="JavaScript" type="text/javascript">
QT_WriteOBJECT('http://www.mysite.com/media_files/<?php echo ($uid);?>/
<?php echo($row['media_tra_name']);?>','300','256','','AUTOPLAY',
'True','SCALE','Aspect');
</script>
</div>
</body>
</html>
If I substitue the dynamic URL above with this, it works:
<script language="JavaScript" type="text/javascript">
QT_WriteOBJECT('http://www.mysite.com/media_files/731/
mediatra_590.m4v','300','256','','AUTOPLAY', 'True','SCALE','Aspect');
</script>
I guess it is the php echo stuff...what else can I do here?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---