My wife and I will be traveling the world by motorcycle starting, God willing, wihtin the next year. I am new to web-development and am looking to create our website on my own. With that said:

I was curious to see how I could upload our videos that we will get from our HD Camcorder (don't have it yet) to our website so people can see our daily video journals. Is there a specific program that I should use for this. I am completely new to this idea and how to implement it to my website.[

Our webhost is Webhostingpad, we have a basic 3.96 per month deal for the next two years (unlimited hosting space and bandwidth, if this means anything).

Thanks in advance,

Erek & Candice

It can be done, there are dozens of video scripts on the web that you can drop into a folder on your web host,
The script searches the folder for video files
displays a menu of them
and lets them click and play
If you name the files you upload in some order, the menu will be in the same order.
my cheap n nasty camera saves .wmv files so I wrote this one, its small(which is the only advantage it has)

<?php ob_start("ob_gzhandler"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"><meta name="distribution" content="global">
<meta http-equiv="content-Script-Type" content="text/javascript">
<meta name="author" content="Rob Dockrey 2004">
<LINK REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="../style.css.php">
<script type="text/javascript">
<!--//
function shrink(){
 document.getElementById("MediaPlayer1").style.width=384;
 document.getElementById("MediaPlayer1").style.height=300;
}
function enLarge(){
 document.getElementById("MediaPlayer1").style.width=480;
 document.getElementById("MediaPlayer1").style.height=402;
}
 //-->
</script>
<title>video - Entertainment - Dockrey Apartments</title>
</head>
<body><H3><center>Videos</center></h3>
<p class='logo'>
<button onclick="enLarge()">large</button>
<button onclick="shrink()">small</button>
<a href='..'>Main Menu</a>
<A HREF="http://www.microsoft.com/windows/windowsmedia/player/download/"><IMG ALT="Get Windows Media Player" SRC="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" WIDTH="88" HEIGHT="31" BORDER="0"></A><br>
<OBJECT ID="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<PARAM NAME="fileName" VALUE="">
<PARAM NAME="showControls" VALUE="true">
<PARAM NAME="PlayCount" VALUE="0">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="" name="MediaPlayer1" width=360 height=260 AutoStart=true></EMBED></object></p>
<div style='float:left; text-align:left;'>
<?php $p = split('/', $_SERVER['SCRIPT_FILENAME']);
	$script_name = $p[count($p)-1];
	$path = str_replace($script_name, '', $_SERVER['SCRIPT_FILENAME']);
	$dir_handle = @opendir($path) or die("Unable to open $path");
	Function get_Extension($m_FileName){
 	$path_parts = pathinfo($m_FileName);
 	if ($path_parts["extension"]) {
 		$m_Extension = strtolower($path_parts["extension"]);
 		return(strtoupper($m_Extension));
 		}
 	else { return "unknown filetypes"; }
 }
 function check_image($filename){
 $temp=strtoupper(get_Extension($filename));
 if(($temp=="WMV")||($temp=="ASF"))
 return (true);
 else
 return (false);
 }
 Function get_Files($path) {
 	if ($handle = opendir($path)) {	
 		while (false !== ($file = readdir($handle))) { 
 		if(!is_dir($file) && substr($file,O,1) != "."){				
				$m_Files[]=$file;
 			}
 		}
 closedir($handle); 
 	}
 if(sizeof($m_Files)>1)
 asort($m_Files);
 return $m_Files;
 }
 $files=get_Files($path); 
 $filter_files=array_filter($files,"check_image");
 $maxnr=sizeof($filter_files)-1;
 sort($filter_files);
for ($i=0;$i<sizeof($filter_files);$i++){
	echo "<a class='button' onclick=\"MediaPlayer1.SRC='$filter_files[$i]';MediaPlayer1.fileName='$filter_files[$i]';\">";
	echo substr($filter_files[$i], 0, strlen($filter_files[$i])-4);
	echo "</a><br>";
 }
closedir($dir_handle); ?></table>

</body></html>
<?php ob_flush(); ?>

forgot, it will play mp3 & wma if you add them to the file list, but NOT well

Edit:

.logo { background: transparent; color: #000000; text-align: right; font-size: 85%; top: auto; left: auto; bottom: 1px; right: 1px; position: fixed; }

'Logo' class is defined in the stylesheet as fixed in the bottom right corner of the screen, as the filelist scrolls up n down the playing video remains in view, usually for our logo and goto top button

Wow,
That is a lot of code. I am still trying to get over the hump of mastering CSS. PHP will be interesting to learn.

Is there any code that i can paste in my html to make it work. And baby step it through the process.

Thanks a lot for the above example and your time.

Erek

Sure is
Google for something like 'utube clone script' 'drop in video script'
'video player for my website'
You'll get hundreds of them. Most of which are easy to install, just copy the files to the server, and make a link somewhere on the page to them
that code makes a 4KB file when you paste it in, so its not big (really :))
just daunting to look atit
it loops through the folder and make
<a onclick='videoplayer1.src.="filename";'>filename</a> buttons

if you save that code as 'index.php' in the 'videos' folder, all you need in your web page is

<a href='./videos/'> Play Videos </a>

and it'll work, (if your host supports php, some hosts don't)

not suggesting that its the only way
You could even just put the videos on utube and make a link to them there

Almostbob,

Awsome, thanks for the reply!! I will try this.

Erek

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.