Computing.Net > Forums > Web Development > how to embed wmv using PHP $_get

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to embed wmv using PHP $_get

Reply to Message Icon

Name: Amy
Date: October 23, 2006 at 20:47:54 Pacific
OS: xp
CPU/Ram: 512
Comment:

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']; ?>" />




Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: October 23, 2006 at 20:51:36 Pacific
Reply:

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


0

Response Number 2
Name: Amy
Date: October 24, 2006 at 09:37:03 Pacific
Reply:

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>



0

Response Number 3
Name: Michael J (by mjdamato)
Date: October 24, 2006 at 11:15:01 Pacific
Reply:

$_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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: how to embed wmv using PHP $_get

how to embed WMV www.computing.net/answers/webdevel/how-to-embed-wmv-/2559.html

how to protect wmv file www.computing.net/answers/webdevel/how-to-protect-wmv-file/2477.html

how to prevent people from viewing www.computing.net/answers/webdevel/how-to-prevent-people-from-viewing-/2488.html