vsodhani
asked on
cgi script sending a smil document
I'm writing a cgi-script that is to take in what realvideo's you want to play in sequence and then creates a SMIL file of the clips so that the browser can call real player which will use the SMIL file to paly the specified clips in sequence. I have written the code which outputs the correct SMIL file to the browser but it just returns an empty page. When I view the source I see the SMIL file is being sent correctly. I have checked the MIME types both in the script and on my web server(IIS 4). Any ideas?
here is the script:
print "Content type: application/smil\n\n";
print "<smil>\n";
print "<head>\n";
print "<meta name=\"base\" content=\"rtsp://fellini.m edia.mit.e du/\"/>\n" ;
print "</head>\n";
print "<body>\n";
print "<seq>\n";
if($ENV{REQUEST_METHOD} eq 'GET'){
$buffer=$ENV{'QUERY_STRING '};
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
foreach $pair (split(/&/, $buffer)){
$pair =~ tr/+//;
($name, $value) = split(/=/, $pair);
print "<video src=\"$value\"/>\n";
}
print "</seq>\n";
print "</body>\n";
print "</smil>\n";
Vikas Sodhani
vsodhani@mit.edu
here is the script:
print "Content type: application/smil\n\n";
print "<smil>\n";
print "<head>\n";
print "<meta name=\"base\" content=\"rtsp://fellini.m
print "</head>\n";
print "<body>\n";
print "<seq>\n";
if($ENV{REQUEST_METHOD} eq 'GET'){
$buffer=$ENV{'QUERY_STRING
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
foreach $pair (split(/&/, $buffer)){
$pair =~ tr/+//;
($name, $value) = split(/=/, $pair);
print "<video src=\"$value\"/>\n";
}
print "</seq>\n";
print "</body>\n";
print "</smil>\n";
Vikas Sodhani
vsodhani@mit.edu
What happens if you change the "Content-type" to "text/html"???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER