Hallo zusammen 🙂
kurze Frage: Wer kennt sich mit php aus ???
Ich habe hier eine php-Code zum berechnen von Downloadzeiten:
<?php
class Downloadtime
{
var $_ifile_size;
var $_iModemtime;
var $_iISDNtime;
var $_iDSLtime;
/*
* times in constructor:
*
* Modem: 56K -> 56 x 1024 / 11 * 8
* ISDN: 64K -> 64 x 1024 / 11 * 8
* DSL: 768K -> 768 x 1024 / 11 * 8
*
* (/11*8 for realistic times -> startbit, endbit ...)
*/
function Downloadtime(
$iModem = 41700,
$iISDN = 47600,
$iDSL = 571950
) {
$this->_iModemtime = $iModem;
$this->_iISDNtime = $iISDN;
$this->_iDSLtime = $iDSL;
} // Downloadtime ()...
function _getDownloadtime($iTime)
{
$sDownloadtime = $this->_ifile_size * 8 / $iTime;
$sDownloadtime = round($sDownloadtime);
if($sDownloadtime == 0)
$sDownloadtime = 1;
return $sDownloadtime;
} // _getDownloadtime ()...
function getModemDownloadtime($iSize)
{
$this->_ifile_size = $iSize;
$sDownloadtime = $this->_getDownloadtime($this->_iModemtime);
return $sDownloadtime;
}//getModemDownloadtime()...
function getISDNDownloadtime($iSize)
{
$this->_ifile_size = $iSize;
$sDownloadtime = $this->_getDownloadtime($this->_iISDNtime);
return $sDownloadtime;
}//getISDNDownloadtime()...
function getDSLDownloadtime($iSize)
{
$this->_ifile_size = $iSize;
$sDownloadtime = $this->_getDownloadtime($this->_iDSLtime);
return $sDownloadtime;
}//getDSLDownloadtime()...
}
?>
ich würde gerne diesen Code in die Datei class.tx_mitdownload_pi1.php von mit_download integrieren.
Habe aber leider keine Ahnung von PHP ;(...
vielleicht kann mir einer ja eine kleinen TIPP geben 🙂
Gruss
db