Browser Control of VLM

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
Scott JHU-ECE

Browser Control of VLM

Postby Scott JHU-ECE » 07 Dec 2005 13:48

Does anyone have experience (and/or thoughts and suggestions) on controlling VLM (either through the telnet or the http interface) from within a browser? I was trying to do it with PHP; which supposedly provides for a telnet connection interface, but it didn't want to connect properly. I'd imagine I could pull it off with a java applet, but I'd like to try and avoid such a cumbersome interface. Has anyone else done this?

werix
New Cone
New Cone
Posts: 5
Joined: 07 Dec 2005 14:14

Postby werix » 07 Dec 2005 17:06

Havn't do it with PHP, but the VLM control is simply a telnet with port 4212 by default, just write a script with socket or telnetlib if exist. I wrote one in python, so it should works with PHP....

Scott JHU-ECE

Re:

Postby Scott JHU-ECE » 07 Dec 2005 17:18

I'm close, very close. I open the connection as follows:
$pw = 'ece';
$fp = fsockopen("128.220.81.237", 80, $errno, $errstr, 10);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: 128.220.81.237\r\n";
$out .= "\r\n";

fputs($fp, $out);

$i = 0; // Placeholder that helps the script along.

echo fgets($fp, 128); // Pasword prompt shows up here.
echo fputs($fp, "ece"); // Send the password.
echo fgets($fp, 128); // Returns wrong password from here on out :-(
echo fputs($fp, $pw);
echo fgets($fp, 128);

fclose($fp);
...and it does indeed bring up the Password: prompt. However, I can't get it to parse the password I send to it (see above). I've tried \r's and \n's at the end of the line and combinations thereof. fputs() gives the number of characters written if successful, and it does indeed spit back '3' at me, as expected. VLC's telnet interface doesn't seem to want to take it though. Any thoughts?

werix
New Cone
New Cone
Posts: 5
Joined: 07 Dec 2005 14:14

Postby werix » 07 Dec 2005 18:47

Hi Scott,

I don't know why you did it with port 80 and those HTTP header's code...

I did the trick by using a ethereal sniffer to "hear" all traffics between VLC server and client side, after that with Following TCP stream, you'll get all message in clair mode... so you might know what's wrong with your code... hope this helps.

cheers

pootle
New Cone
New Cone
Posts: 7
Joined: 28 Dec 2005 12:14
Location: Staffs, UK

Re: Browser control ofVLM from a php web site

Postby pootle » 07 Jan 2006 13:34

[quote="Scott JHU-ECE"]I'm close, very close. [quote]
Scott, did you get control through the telnet interface working from php?
I would like to do the same sort of thing...
Streaming audio and vidio from a server, controlled by a database and web site written in php - that is the plan :)

mediaguy06
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Mar 2006 16:40

control

Postby mediaguy06 » 24 Mar 2006 17:11

I suggest trying using remote terminal with Xp maybe that would be a better choice. I also have a question am looking to use a database to stream my files. Do youhave any suggestions on how to make one I saw that you are making one so I would like to get some pointers where I can look at some code to create one. Thanks

Guest

Re:

Postby Guest » 29 Mar 2006 13:18

I'm close, very close. I open the connection as follows:
$pw = 'ece';
$fp = fsockopen("128.220.81.237", 80, $errno, $errstr, 10);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: 128.220.81.237\r\n";
$out .= "\r\n";

fputs($fp, $out);

$i = 0; // Placeholder that helps the script along.

echo fgets($fp, 128); // Pasword prompt shows up here.
echo fputs($fp, "ece"); // Send the password.
echo fgets($fp, 128); // Returns wrong password from here on out :-(
echo fputs($fp, $pw);
echo fgets($fp, 128);

fclose($fp);
...and it does indeed bring up the Password: prompt. However, I can't get it to parse the password I send to it (see above). I've tried \r's and \n's at the end of the line and combinations thereof. fputs() gives the number of characters written if successful, and it does indeed spit back '3' at me, as expected. VLC's telnet interface doesn't seem to want to take it though. Any thoughts?
:D


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 6 guests