Jump to content

Recommended Posts

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

 

<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 with player for the file url they added, this is the video.php page which is meant to take the link from the submit.php page, but doesn't, so know not doing something right in it.

 

video.php

<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>

 

Any help would be very much appreciated.

Link to comment
https://forums.phpfreaks.com/topic/202772-divx-generator/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.