The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Divx generator
Nailz
post May 24 2010, 12:08 PM
Post #1





Group: Members
Posts: 1
Joined: 24-May 10
Member No.: 11,941



I'm trying to do a divx generator for my site, but not that good with html, so far got a submit.php page and video.php page

submit page

which this the html I have for that page

CODE
<html>
<head><link rel="stylesheet" type="text/css" href="muplayerstyle.css" />
</head><center><body>
<br>
<form action="video.php" method="get" >
  Divx Link: <input name="link" id="link" size="70" type="text">
<br>
  <input name="submit" id="submit" value="Submit" type="submit">
</form>

<p>Paste the direct download url of a divx/avi link from any file host <br>
and it will be played through the divx player in a new page </p>

<br>
</body></center>
</html>


So someone is meant to be able to put a avi link and click submit and get the video page

Code for video page
CODE
<html>
<head><link rel="stylesheet" type="text/css" href="muplayerstyle.css" />
</head>
<center><body>


<div>
    <object id='ie_plugin' classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616' width='624' height='352' codebase='http://go.divx.com/plugin/DivXBrowserPlugin.cab'>
    <param name='type' value='video/divx' />
    <param name='pluginspage' value='http://go.divx.com/plugin/download/' />
        <param name="src" value="">
    <param name='custommode' value='none' />
    <param name='autoPlay' value='true' />
    <param name='bannerEnabled' value='false' />    
    <param name="movieTitle"
value= />
    <param name='timeCallback' value='myTimeCallback' />
    <param name='statusCallback' value='myDivXPlugin.statusCallbackSink' />
    <param name='bufferCallback' value='myBufferCallback' />
    <param name='downloadCallback' value='myDownloadCallback' />
    <param name='previewImage' value='myPreviwImage' />
    
    
    
    
    

    <embed id='np_plugin' width='624' height='352'
    type='video/divx'
    pluginspage='http://go.divx.com/plugin/download/'
    src=""    autoPlay='true'  
    bannerEnabled='false'
    movieTitle=    previewImage=''  
    timeCallback='myTimeCallback'
    statusCallback='myDivXPlugin.statusCallbackSink'
    bufferCallback='myBufferCallback'
    downloadCallback='myDownloadCallback'>

    </embed>
    </object>
    </div><div><label id="currentStatus"></label> <label id="currentDownload"></label> <label id="totalDownload"></label> <label id="downloadSpeed"></label></div>





    

<script type="text/javascript">
    var plugin;
    if(navigator.userAgent.indexOf('MSIE') != -1)
    {
        plugin = document.getElementById('ie_plugin');
    }
    else
    {
        plugin = document.getElementById('np_plugin');
    }
//--------------------
    function myTimeCallback(current)
    {
         //document.getElementById('currentTime').innerHTML = current;
    }
    function myBufferCallback(current,total)
    {
         //document.getElementById('currentBuffer').innerHTML = current;
         //document.getElementById('totalBuffer').innerHTML = total;
    }
    var lastKB = 0;
    var curSpeed = 0;
    function myDownloadCallback(current,total)
    {
         curSpeed = Math.round((current - lastKB) / 1000);
         document.getElementById('currentDownload').innerHTML = Math.round(current / 100000)/10;
         document.getElementById('totalDownload').innerHTML = ' of ' + Math.round(total / 100000)/10 + ' MB ';
         document.getElementById('downloadSpeed').innerHTML = '(' + curSpeed + 'KB/s)';
         lastKB = current;
    }
    var BScounter = 0;
    function DivXPluginSinks()
    {
        this.statusCallbackSink = function(status)
        {
            var s = parseInt(status);
            switch(s)
            {
                 case 0:  //
                 document.getElementById('currentStatus').innerHTML = 'Initialized';
                 break;
                 case 1:  //
                 document.getElementById('currentStatus').innerHTML = 'Video Opened';
                 //confirmLeave = true;
                 break;
                 case 2:  // VIDEO_END
                 document.getElementById('currentStatus').innerHTML = 'End of Video';
                 //confirmLeave = false;
                 break;
                 case 3:  //
                 document.getElementById('currentStatus').innerHTML = 'Shut Done';
                 break;
//                 case 4:  //
//                 document.getElementById('currentStatus').innerHTML = 'Embedded Start';
//                 break;
//                 case 5:  //
//                 document.getElementById('currentStatus').innerHTML = 'Embedded End';
//                 break;
//                 case 6:  //
//                 document.getElementById('currentStatus').innerHTML = 'Windowed Start';
//                 break;
//                 case 7:  //
//                 document.getElementById('currentStatus').innerHTML = 'Windowed End';
//                 break;
//                 case 8:  //
//                 document.getElementById('currentStatus').innerHTML = 'Fullscreen';
//                 break;
//                 case 9:  //
//                 document.getElementById('currentStatus').innerHTML = 'Exit Fullscreen';
//                 break;
                 case 10: // STATUS_PLAYING
                 document.getElementById('currentStatus').innerHTML = '';
                 break;
                 case 11: // STATUS_PAUSED
                 document.getElementById('currentStatus').innerHTML = '';
                 break;
                 case 12: // STATUS_FF
                 document.getElementById('currentStatus').innerHTML = '';
                 break;
                 case 13: // STATUS_RW
                 document.getElementById('currentStatus').innerHTML = '';
                 break;
                 case 14: // STATUS_STOPPED
                 document.getElementById('currentStatus').innerHTML = '';
                 break;
                 case 15:  //
                 BScounter++;
                 document.getElementById('currentStatus').innerHTML = 'Connect Attempt #'+BScounter;
                 break;
                 case 16:  //
                 document.getElementById('currentStatus').innerHTML = 'Buffering Stop';
                 break;
                 case 17:  //
                 document.getElementById('currentStatus').innerHTML = 'Download Start';
                 break;
                 case 18:  //
                 document.getElementById('currentStatus').innerHTML = 'Download Failed';
                 break;
                 case 19:  //
                 document.getElementById('currentStatus').innerHTML = 'Download Done';
                 var playlink = '';
                 var playlink = playlink.replace("**^fugggin_quatahaba^*","'");
                 if (document.getElementById('totalDownload').innerHTML == '')
                 plugin.Open(playlink);
                 break;
            }
        }
    }
    myDivXPlugin = new DivXPluginSinks()
</script>






    

    </body></center>


Now as not that good with html, it is not taking the avi link from the submit.php and adding it to video.php to be able to play the file. where am I going wrong to get this working, any help would be very much appreciated.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies(1 - 1)
geoffmerritt
post May 31 2010, 08:51 AM
Post #2


Member
***

Group: Members
Posts: 66
Joined: 23-December 08
From: Adelaide
Member No.: 7,394



video.php and submit.php are not html files, they are php which is a server side script.

You are trying to pass information from one file to another, which html will never be able to do.

In the video.php there isn't a $_get comand to receive the sent info..... go to google and search "php _get" or "php _post" and do some reading.
QUOTE
So someone is meant to be able to put a avi link and click submit and get the video page

Doesn't windows media player already play a video from a url?


--------------------
Carpe Diem

I mainly code in php, so my answers will have a html and php bias. www.caboosewebdesign.com.au
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st April 2014 - 07:08 AM