ok so i need a simple php script, i will give credit to anyone who helps :)

---------
cam.php?camera_ip=192.168.2.115

when page loads it loads a windows media player applet thing viewing the media stream at 192.168.2.115

and if its changed to cam.php?camera_ip=192.168.2.169
then it views stream at 192.168.2.169

i need some full working code, i have tried learning php , but i still suck :cry:
:cheesy:
any help will be appreciated and will get credit :eek:

Recommended Answers

All 3 Replies

So... You want all the code to do the entire project? That's a tall order.

What kind of streams are you working with? How do you access them currently?

So... You want all the code to do the entire project? That's a tall order.

What kind of streams are you working with? How do you access them currently?

well at the moment i simply have a html page with a wmp applet with the "src=" tag located to 192.168.2.115:8080 but this is for a multi cam thing where i can just add links to the database, if you understand?

like a page of links with each link being cam.php?ip=<ip of cam stream here>

this will save LOADS of time making loads of html pages for every camera :P

all i need is the code for cam.php, i can handle the intergration into the style

The original code was:

<object width="350" height="350" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1"> 
  <param name="Filename" value="<?php print $stream_address; ?>"> 
  <param name="AutoStart" value="True"> 
  <param name="ShowControls" value="True"> 
  <param name="ShowStatusBar" value="True"> 
  <param name="ShowDisplay" value="False"> 
  <param name="AutoRewind" value="True"> 
  <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="350" height="350" src="<?php print $stream_address; ?>" filename="<?php print $stream_address; ?>" autostart="True" showcontrols="True" showstatusbar="True" showdisplay="False" autorewind="True"></embed> 
</object>

This was fixed to produce:

<object width="350" height="350" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1"> 
  <param name="Filename" value="<?php print $_GET['stream_address']; ?>"> 
  <param name="AutoStart" value="True"> 
  <param name="ShowControls" value="True"> 
  <param name="ShowStatusBar" value="True"> 
  <param name="ShowDisplay" value="False"> 
  <param name="AutoRewind" value="True"> 
  <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="350" height="350" src="<?php print $_GET['stream_address']; ?>" filename="<?php print $_GET['stream_address']; ?>" autostart="True" showcontrols="True" showstatusbar="True" showdisplay="False" autorewind="True"></embed> 
</object>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.