Skip to content

Commit 057292d

Browse files
committed
first commit
0 parents  commit 057292d

File tree

211 files changed

+1754
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+1754
-0
lines changed

Installation.html

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<style type="text/css">
2+
<!--
3+
.subtitle {
4+
font: normal 14px/15px "Lucida Sans Unicode", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
5+
letter-spacing: -1px;
6+
color: #555555;
7+
border-bottom-style: dotted;
8+
border-bottom-width: 1px;
9+
border-bottom-color: #999;
10+
margin: 1px;
11+
word-spacing: 1px;
12+
border-right-style: dotted;
13+
border-right-width: 1px;
14+
padding: 2px;
15+
background-color: #EDEBEB;
16+
border-top-color: #999;
17+
border-right-color: #999;
18+
border-left-color: #A59A9B;
19+
border-top-width: 1px;
20+
border-left-width: 4px;
21+
border-left-style: solid;
22+
-moz-border-radius-bottomleft:9px;
23+
-webkit-border-bottom-left-radius:9px;
24+
}
25+
26+
.content {
27+
padding: 5px;
28+
margin: 1px;
29+
-moz-border-radius-topleft:9px;
30+
-webkit-border-top-left-radius:9px;
31+
border-width: 1px;
32+
border-style: solid;
33+
border-color: #DADEE9;
34+
color: #666;
35+
font-size: 14px;
36+
font-family: "Lucida Sans Unicode", "Trebuchet MS", Arial, Helvetica, sans-serif;
37+
line-height: 15px;
38+
background-color: #EEF5FD;
39+
}
40+
41+
A
42+
{
43+
color: #DE5F78;
44+
text-decoration: none;
45+
}
46+
47+
A:hover
48+
{
49+
color: #BB5D86;
50+
text-decoration: underline;
51+
}
52+
53+
-->
54+
</style>
55+
56+
<div class="subtitle">VideoWhisper &gt; <strong>Live Streaming</strong> &gt; <strong>PHP</strong> Stand Alone</div>
57+
<div class="content"><br />
58+
See requirements and step by step setup instructions on <a href="http://www.videowhisper.com/?p=PHP+Live+Streaming">PHP Live Streaming Installation Instructions</a> page.<br />
59+
You can also download latest version, required rtmp applications and also get information about compatible hosting from VideoWhisper.com .
60+
<br />
61+
<br />
62+
<br />
63+
</div>
64+

Installation.url

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[InternetShortcut]
2+
URL=http://www.videowhisper.com/?p=PHP+Live+Streaming

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PHP-Live-Streaming-Webcam

ads.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/* Sample local ads serving script ; Or use http://adinchat.com compatible ads server to setup http://adinchat.com/v/your-campaign-id
3+
4+
POST Variables:
5+
u=Username
6+
s=Session, usually same as username
7+
r=Room
8+
ct=session time (in milliseconds)
9+
lt=last session time received (from web status script)
10+
11+
*/
12+
13+
$room=$_POST[r];
14+
$session=$_POST[s];
15+
$username=$_POST[u];
16+
17+
$currentTime=$_POST[ct];
18+
$lastTime=$_POST[lt];
19+
20+
$ztime=time();
21+
22+
//fill ad to show
23+
$ad="<B>Sample Ad</B><BR>Edit ads in ads.php. Also edit vs_login.php to setup adsInterval in milliseconds (0 to disable ad calls), adsTimeout to setup time in milliseconds until first ad is shown. Also see <a href=\"http://www.adinchat.com\" target=\"_blank\"><U><B>AD in Chat</B></U></a> compatible ad management server.";
24+
25+
?>x=1&ad=<?=urlencode($ad)?>&loadstatus=1

channel.php

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<head>
2+
<?php
3+
$n=$_GET["n"];
4+
5+
include("incsan.php");
6+
sanV($n);
7+
if (!$n) exit;
8+
9+
$swfurl="live_watch.swf?n=".urlencode($n);
10+
$bgcolor="#333333";
11+
?><style type="text/css">
12+
<!--
13+
body {
14+
font-family: Arial, Helvetica, sans-serif;
15+
background-color: #000;
16+
font-size: 15px;
17+
color: #EEE;
18+
}
19+
20+
a
21+
{
22+
color: #FF6699;
23+
font-weight: normal;
24+
text-decoration: none;
25+
}
26+
-->
27+
</style><title><?=$n?> Live Video Streaming</title>
28+
</head>
29+
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
30+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
31+
<tr>
32+
<td align="center" bgcolor="#000000"><p><strong>You are watching:
33+
<?=strip_tags($n)?>
34+
</strong><br>
35+
Channel Demo Page - Edit channel.php to change this</p>
36+
<p><strong><br />
37+
</strong></p>
38+
<?php
39+
$agent = $_SERVER['HTTP_USER_AGENT'];
40+
if( strstr($agent,'iPhone') || strstr($agent,'iPod') || strstr($agent,'iPad'))
41+
echo "<p><b>iOS detected: If your browser does not support Flash plugin, a transcoded stream could be available (if supported by host): <BR> <a href='ls_transcoder.php?n=$n'>VideoWhisper iOS Transcoder</a></b></p><BR>";
42+
?>
43+
</td>
44+
</tr>
45+
<tr>
46+
<td height=400 bgcolor="#333333">
47+
48+
<object width="100%" height="100%" type="application/x-shockwave-flash" data="<?=$swfurl?>">
49+
50+
<param name="movie" value="<?=$swfurl?>" />
51+
<param bgcolor="<?=$bgcolor?>" />
52+
<param name="scale" value="noscale" />
53+
<param name="salign" value="lt" />
54+
<param name="allowFullScreen" value="true" />
55+
<param name="allowscriptaccess" value="always" />
56+
57+
</object>
58+
59+
</td>
60+
</tr>
61+
</table>
62+
63+
<?php
64+
include("flash_detect.php");
65+
?>
66+
<p><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">The flash workspace above can have any size. Any of the panels can be disabled from vs_login.php .
67+
<BR>You can also embed just <a href="video_small.php?n=<?=$n?>">plain video</a> (<a href="video.php?n=<?=$n?>">fullpage video</a>) or send mobile users without flash to a <a href="htmlchat.php?n=<?=$n?>">plain html external text chat interface</a>. </font></p>
68+
<p>If server supports required tools HTTP Live Streaming may be available: <a target="_blank" href="ls_transcoder.php?n=<?=urlencode($n)?>">iOS Transcoder</a> (for iPhone and iPad, if available).</p>
69+
<p><a href="http://www.videowhisper.com/?p=Live+Streaming">Video Whisper Live Streaming</a></p>

clean_older.php

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
$old = 30*24*3600;
4+
5+
function deltree($path) {
6+
global $old;
7+
$delete_this = 1;
8+
if (is_dir($path)) {
9+
if (version_compare(PHP_VERSION, '5.0.0') < 0) {
10+
$entries = array();
11+
if ($handle = opendir($path)) {
12+
while (false !== ($file = readdir($handle))) $entries[] = $file;
13+
14+
closedir($handle);
15+
}
16+
} else {
17+
$entries = @scandir($path);
18+
if ($entries === false) $entries = array(); // just in case scandir fail...
19+
}
20+
21+
foreach ($entries as $entry) {
22+
if ($entry != '.' && $entry != '..') {
23+
if (deltree($path.'/'.$entry)==-1) $delete_this=0;
24+
}
25+
}
26+
27+
if ($delete_this) if (time()-filemtime($path)> $old) return @rmdir($path);
28+
else return -1;
29+
} else {
30+
if ($delete_this) if (time()-filemtime($path)> $old) return @unlink($path);
31+
else return -1;
32+
}
33+
return -1;
34+
}
35+
36+
function cleanUp($dir)
37+
{
38+
global $old;
39+
40+
echo "<BR><small>Cleaning up old files in $dir ...";
41+
$k=0;
42+
$handle=opendir($dir);
43+
while (($file = readdir($handle))!==false)
44+
{
45+
if (($file != ".") && ($file != ".."))
46+
{
47+
if (is_dir("$dir/" . $file)) deltree($dir."/".$file);
48+
elseif (time()-filemtime("$dir/" . $file)> $old) @unlink("$dir/" . $file);
49+
$k++;
50+
51+
if ($k%50==0)
52+
{
53+
echo " .";
54+
flush();
55+
}
56+
}
57+
}
58+
closedir($handle);
59+
echo "<BR>Finished cleaning up $k items.</small>";
60+
}
61+
62+
cleanUp('uploads');
63+
cleanUp('snapshots');
64+
?>

css.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
title {
2+
font-family: Arial, Helvetica, _sans;
3+
font-size: 11;
4+
font-weight: bold;
5+
color: #FFFFFF;
6+
letter-spacing: 1;
7+
text-decoration: none;
8+
}
9+
10+
story {
11+
font-family: Verdana, Arial, Helvetica, _sans;
12+
font-size: 14;
13+
font-weight: bold;
14+
color: #FFFFFF;
15+
}

defaultpicture.png

19.3 KB
Loading

delete_all_uploads.php

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
//can setup a password below like 'pass' instead of '' to only allow access like delete_all_uploads.php?password=pass
4+
if ($_GET['password']!='') exit;
5+
6+
function deltree($path) {
7+
if (is_dir($path)) {
8+
if (version_compare(PHP_VERSION, '5.0.0') < 0) {
9+
$entries = array();
10+
if ($handle = opendir($path)) {
11+
while (false !== ($file = readdir($handle))) $entries[] = $file;
12+
13+
closedir($handle);
14+
}
15+
} else {
16+
$entries = @scandir($path);
17+
if ($entries === false) $entries = array(); // just in case scandir fail...
18+
}
19+
20+
foreach ($entries as $entry) {
21+
if ($entry != '.' && $entry != '..') {
22+
deltree($path.'/'.$entry);
23+
}
24+
}
25+
26+
return @rmdir($path);
27+
} else {
28+
return @unlink($path);
29+
}
30+
}
31+
32+
function cleanUp($dir)
33+
{
34+
echo "Deleting ...";
35+
flush();
36+
$k=0;
37+
$handle=opendir($dir);
38+
while (($file = readdir($handle))!==false)
39+
{
40+
if (($file != ".") && ($file != ".."))
41+
{
42+
if (is_dir("$dir/" . $file)) deltree($dir."/".$file);
43+
else @unlink("$dir/" . $file);
44+
$k++;
45+
46+
if ($k%50==0)
47+
{
48+
echo " .";
49+
flush();
50+
}
51+
}
52+
}
53+
closedir($handle);
54+
echo "<BR>Finished cleaning up $k rooms.";
55+
}
56+
57+
cleanUp('uploads');
58+
?>

detect_ffmpeg.php

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
//detect ffmpeg
3+
echo "<BR>FFMPEG Detection: ";
4+
$cmd = '/usr/local/bin/ffmpeg -version';
5+
$output = '';
6+
exec($cmd, $output, $returnvalue);
7+
if ($returnvalue == 127) echo "<b>Warning: not detected: $cmd</b>";
8+
else
9+
{
10+
echo "detected";
11+
echo '<BR>' . $output[0];
12+
echo '<BR>' . $output[1];
13+
14+
$cmd = '/usr/local/bin/ffmpeg -codecs';
15+
exec($cmd, $output, $returnvalue);
16+
17+
//detect codecs
18+
if ($output) if (count($output))
19+
{
20+
echo "<br>Codecs:";
21+
foreach (array('h264', 'vp6', 'faac','speex', 'nellymoser') as $cod)
22+
{
23+
$det=0; $outd="";
24+
echo "<BR>$cod codec: ";
25+
foreach ($output as $outp) if (strstr($outp,$cod)) { $det=1; $outd=$outp; };
26+
if ($det) echo "detected ($outd)"; else echo "<b>missing: please configure and install ffmpeg with $cod</b>";
27+
}
28+
}
29+
30+
}

emoticons/angry.gif

465 Bytes
Loading

emoticons/aysmile.gif

132 Bytes
Loading

emoticons/baby.gif

1.01 KB
Loading

emoticons/ban.gif

1.22 KB
Loading

emoticons/bash.gif

2.87 KB
Loading

emoticons/bath.gif

5.2 KB
Loading

emoticons/beer.gif

17.8 KB
Loading

emoticons/biggrin.gif

696 Bytes
Loading

emoticons/blush.gif

1.11 KB
Loading

emoticons/book.gif

1.37 KB
Loading

emoticons/bored.gif

700 Bytes
Loading

emoticons/bounce.gif

2.69 KB
Loading

emoticons/boxed.gif

405 Bytes
Loading

emoticons/boxing.gif

5.14 KB
Loading

emoticons/censored.gif

93 Bytes
Loading

emoticons/cheers.gif

4.87 KB
Loading

emoticons/clap.gif

2.15 KB
Loading

emoticons/cool.gif

696 Bytes
Loading

emoticons/cool.png

940 Bytes
Loading

emoticons/cry.gif

696 Bytes
Loading

emoticons/cry.png

970 Bytes
Loading

emoticons/crybaby.gif

3.47 KB
Loading

emoticons/crying.gif

903 Bytes
Loading

emoticons/disgust.gif

695 Bytes
Loading

emoticons/drool.gif

1.17 KB
Loading

emoticons/drunk.gif

13.8 KB
Loading

emoticons/duel.gif

5.75 KB
Loading

emoticons/eek.gif

1.23 KB
Loading

0 commit comments

Comments
 (0)