Jump to content
GIGN Forum

Hltv


Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

nezinu kaa jums bet man kad mape kur ir demo faili demo ir daudz man neuploudojas tapec es to kodu bik uzlaboju !

<html>
<head>
<title>demo</title>
</head>
<body>
<?
  function zipcompressfile($source,$destination,$filename,$level=false)
  {
      $dest=$destination.$filename.'.zip';
      $mode='wb'.$level;
      $error=false;
          echo $source.$filename.' -> '.$dest.'<br>';
      if($fp_out=gzopen($dest,$mode))
     {
          if($fp_in=fopen($source.$filename,'rb'))
          {
             while(!feof($fp_in))
              {
                  gzwrite($fp_out,fread($fp_in,1024*512));
              }
              fclose($fp_in);
         }
         else
         {
             $error=true;
                       }
          gzclose($fp_out);
      }
      else $error=true;
      if($error) return false;
      else return $dest;
  }

  $demo_dir = 'C:/demo/'; // Folder with .dem files
 $dl_dir = 'C:/AppServ/www/demo_zip/'; // Folder, where to put compressed files
 
  $handle = opendir($demo_dir);   
  if ($handle)
  {
      while (false !== ($fails = readdir($handle)))
      {
          if ( preg_match("/(.*).dem/", $fails, $demo) )
          {
              zipcompressfile($demo_dir, $dl_dir, $fails);
           unlink($demo_dir.$fails);
        }   
  }
     closedir($handle);   
     }
?>
<meta http-equiv="Refresh" content="1800;URL=#" />

</body>
</html>

tagad pec demo parteisisanas zip demo izdzesisies! un ik pets pus stundas lapa atjaunosies! smile.gif

tnx visu sapratu iznjemot

kas ar to scriptu jadara ?

Link to comment
Share on other sites

Blja hltv.cfg failaa pierakstiiju to suudu...atveru hltv.exe ...un tad vinjsh man uzraksta

!Warning! DemoFile::StartRecording: coudn't open demo file C:/AppServ/www/demo/hustle_-0610262354-aim_map.dem.

Ko dariit?

Centos pievienot arii bildi biggrin.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gifsmiliez.de_2477.gif

BILDITE : SPIED CIK SPEKA

Eu zin ko,beidz double-postot.ir tāda forša poga EDIT,un vēl kūli teksti kā p.s.,edīte,EDIT...un ja kas es tur vēlējos redzēt ko vairāk nekā File Not Found.... sad.gif

Link to comment
Share on other sites

  • 3 weeks later...
Pff nu pa šito figņu ir daudz runātszz...

Labi uzrakstīšu vēlreiz ~~ jau kāda cita minēto pirms kāda laika!

Kompresācijas skripts

<?
   function zipcompressfile($source,$destination,$filename,$level=false)
   {
       $dest=$destination.$filename.'.zip';
       $mode='wb'.$level;
       $error=false;
           echo $source.$filename.' -> '.$dest.'<br>';
       if($fp_out=gzopen($dest,$mode))
      {
           if($fp_in=fopen($source.$filename,'rb'))
           {
              while(!feof($fp_in))
               {
                   gzwrite($fp_out,fread($fp_in,1024*512));
               }
               fclose($fp_in);
          }
          else
          {
              $error=true;
                        }
           gzclose($fp_out);
       }
       else $error=true;
       if($error) return false;
       else return $dest;
   }

   $demo_dir = 'D:/AppServ/www/recorded_demos/'; // Folder with .dem files
  $dl_dir = 'D:/AppServ/www/compressed_demos/'; // Folder, where to put compressed files
  
   $handle = opendir($demo_dir);   
   if ($handle)
   {
       while (false !== ($fails = readdir($handle)))
       {
           if ( preg_match("/(.*).dem/", $fails, $demo) )
           {
               zipcompressfile($demo_dir, $dl_dir, $fails);
         }   
   }
      closedir($handle);   
      }
?>

Apskatīšanas skripts

<?php
if ($handle = opendir('D:/AppServ/www/compressed_demos/')) {
while (false !== ($file = readdir($handle))) {
if (strlen($file) > 4)
{
$gabali = explode("-", $file);
$date = $gabali[1];
$mape = $gabali[2];
$mapesgabali = explode(".", $mape);
$name = $mapesgabali[0];
$year = substr($date,0,2);
$month = substr($date,2,2);
$day = substr($date,4,2);
$hour = substr($date,6,2);
$minute = substr($date,8,2);
echo "<center>$day.$month.$year             $hour:$minute             $name             <a href=\"http://yourweb.com/compressed_demos/$file\">Download</a></br></center>";
}
}
closedir($handle);
}
?>

Lai ierakstitu demo tavaa www folderii mapee demo!!!

Atver hltv.cfg un pieraksti:

  • record "../../AppServ/www/demo/demo_nosaukums"
  • connect "hustle.no-ip.info"
Tas laikam bija viss!

es nesaprotu kur tas kompresacijas sripts jaliek, kur sos skriptus vajag likst? kaa vinjus vajag liktt? plzz pastaastat siikaak

Link to comment
Share on other sites

  • 3 weeks later...

man liekas, ka to var pat MOSHKA izdariit taa, tjipa uztaisi demo.php kuraa ir demo mapes paarluuka scripts, un tajaa panjem vnk inkluudo

<?

include 'hltv_compress.php'

?>

es nez, bet ja gribat, lai buutu taa normaali, lai ik pa 30 min atjaunojaas, tad varu uztaisiit nelielu formu ar taimeri..

Link to comment
Share on other sites

Kaa lai dabuu lai noparveidojas zip formata bet rar jo tam dakjim kam ir web vinjam windows rus valodaa un binjam naw tada opcija show hiden ...... vinjsh var parveidot tikai rar formata Kuras rindas japarveido?

Es itkaa vienu rindu parveidoju bet shitads error kad parveido

Warning: unlink(C:/demo/pub-0701041441-aim_ak-colt.dem) [function.unlink]: Permission denied in C:\\AppServ\\www\\hltv.php on line 45

Edited by A_N_D_R_E_E
Link to comment
Share on other sites

Lab sry par dubult postu, bet to iepriekshejo varat nenjemt veraa. Tatad shis ir veltits visam, kas saistits ar hltv nu tad man ir ari dazhi jautajumi. Ka var izdarit taa, lai uzspiezhot uz kadu demku (tas ir domats kad no web kachaa) vinjsh atver papildus logu kur var noladet attiecigo speletaju, kas spelejis + arii, lai var noladet full demku, ja nu kadam shis nepatik. Velviena lieta kas ir viewdemo.php skripta jaraksta lai atvertu bildi pasha augsha kjip banneri?

Link to comment
Share on other sites

  • 2 weeks later...

un sim kas ir

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\AppServ\www\compressed_demos\index.php on line 2

Parse error: parse error, unexpected T_FUNCTION in C:\AppServ\www\compressed_demos\index.php on line 2

WARNING! DemoFile : : StartRecording: coudn t open demo file ../../Appserv/www/compressed_demos/cf-0703122210-fy_iceworld2k.dem.

Paliga

Edited by php><php
Link to comment
Share on other sites

un sim kas ir

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\AppServ\www\compressed_demos\index.php on line 2

Parse error: parse error, unexpected T_FUNCTION in C:\AppServ\www\compressed_demos\index.php on line 2

WARNING! DemoFile : : StartRecording: coudn t open demo file ../../Appserv/www/compressed_demos/cf-0703122210-fy_iceworld2k.dem.

Paliga

atver to php failu un iekopee otro rindu!

Link to comment
Share on other sites

  • 2 months later...
Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...