Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Say if the embedded wmv code is as follows, what would be the code for the "host.php"? Please help. Thanks!
<param name="host" value="<?php echo $_GET['host']; ?>" />

1. this belongs in the Web Development forum
2.The above code does not require, nor would it use a "host.php" file.
The "$_GET['host']" in the above code would get that value from the URL.
Example:
somedomain.com/somepage.php?host=TheValue
Michael J

Thanks Michael.
I tried using the htm/php codes below but it's not working. I wonder where the error is?
say location of wmv file = http://domain.com/video/movie1.wmv
and appended below are the codes for test.php:
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<object id="player" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="240" height="200">
<param name="AutoStart" value="true">
<param name="uiMode" value="full">
<param name="http://domain.com/test.php" value="<?php echo $_GET['http://domain.com/video/movie1.wmv']; ?>">
</object></div>
</body>
</html>

$_GET is a global variable in PHP. The values are passed in the URL. In the code you posted the PHP is looking for a variable called 'http://domain.com/video/movie1.wmv' that was passed in the URL. I doubt you are doing that, so the value is null.
I don't know a lot about embedding content, but I will try to give you a an example of how I think it shuld work based upon your first example:Let's assume that the code in response #2 was in a page called newFile.php and that the last line was the same as you posted in your original post: "<param name="host" value="<?php echo $_GET['host']; ?>" />"
OK, you would pass the host to the page by including it in the URL like this:
www.somedomain.com/newFile.php&host=http://domain.com/video/movie1.wmv
Now when you call the newFile.php page it will be processed by the PHP interpreter. When it gets to this line:
<param name="host" value="<?php echo $_GET['host']; ?>" />
It will check the URL to see if a value was passed for 'host', if so it will put it into the code so that the resulting html will be
<param name="host" value="http://domain.com/video/movie1.wmv" />
Michael J

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |