Skocz do zawartości

matizimny

Użytkownicy
  • Zawartość

    60
  • Rejestracja

  • Ostatnio

Posty napisane przez matizimny


  1. Jeżeli chodzi o wordpressa jest jedno przekierowanie związane z pl wygląda tak

     

    ss.PNG

    Htaccess tak to wygląda

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    
    
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
    
        ExpiresActive on
        ExpiresDefault                                      "access plus 1 week"
    
      # CSS
        ExpiresByType text/css                              "access plus 1 week"
    
      # Data interchange
        ExpiresByType application/json                      "access plus 0 seconds"
        ExpiresByType application/xml                       "access plus 0 seconds"
        ExpiresByType text/xml                              "access plus 0 seconds"
    
      # Favicon (cannot be renamed!) and cursor images
        ExpiresByType image/x-icon                          "access plus 1 week"
    
      # HTML components (HTCs)
        ExpiresByType text/x-component                      "access plus 1 week"
    
      # HTML
        ExpiresByType text/html                             "access plus 0 seconds"
    
      # JavaScript
        ExpiresByType application/javascript                "access plus 1 week"
    
      # Manifest files
        ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
        ExpiresByType text/cache-manifest                   "access plus 0 seconds"
    
      # Media
        ExpiresByType audio/ogg                             "access plus 1 month"
        ExpiresByType image/gif                             "access plus 1 month"
        ExpiresByType image/jpeg                            "access plus 1 month"
        ExpiresByType image/png                             "access plus 1 month"
        ExpiresByType video/mp4                             "access plus 1 month"
        ExpiresByType video/ogg                             "access plus 1 month"
        ExpiresByType video/webm                            "access plus 1 month"
    
      # Web feeds
        ExpiresByType application/atom+xml                  "access plus 1 hour"
        ExpiresByType application/rss+xml                   "access plus 1 hour"
    
      # Web fonts
        ExpiresByType application/font-woff                 "access plus 1 month"
        ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
        ExpiresByType application/x-font-ttf                "access plus 1 month"
        ExpiresByType font/opentype                         "access plus 1 month"
        ExpiresByType image/svg+xml                         "access plus 1 month"
    
            Header set Cache-Control "max-age=31536000, public"
    
    
            Header set Cache-Control "max-age=31536000, private"
    
    

  2. Hmm, ostatnio troszkę kiepsko z funduszami stoję ale rozmyśle twoją propozycję, NetMat tu mam do wyciągania ile osób jest na serwerze ale nie wiem jak to z sobą z łączyć jak możesz to luknij w to.

    <?php
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    TeamSpeak3::init();
    $cfg["user"]="";
    $cfg["pass"]="";
    $cfg["host"]="127.0.0.1";
    $cfg["query"]="10011";
    
    try
    {
      $ts3_ServerInstance = TeamSpeak3::factory("serverquery://" . $cfg["user"] . ":" . $cfg["pass"] . "@" . $cfg["host"] . ":" . $cfg["query"] . "/");
      $ts3_VirtualServer = $ts3_ServerInstance->serverGetById(1); // z reguły 1 jest okej, bo to pierwszy wirtualny serwer.
      $dane = $ts3_VirtualServer->getInfo(TRUE, TRUE);
      echo "<p>";
      echo "Status: ".$dane["virtualserver_status"]."<br/ >";
      echo "Adres: ".$cfg["host"]."<br />";
      echo "Licencja: NPL<br />";
      echo "Użytkowników: ".$dane["virtualserver_clientsonline"]."/".$dane["virtualserver_maxclients"]." <br />";
      echo "</p>";
    } catch(Exception $e)
    
    {
      /* catch exceptions and display error message if anything went wrong */
      echo "<span class='error'><b>FAIL " . $e->getCode() . ":</b> " . $e->getMessage() . "</span>\n";
    }
    
    ?>
    

  3. Witam Wszystkich!

    Szukam skryptu który działał by podobnie jak gametracker z tym że tylko miał by pokazywać ile osób jest na serwerze, obrazek miał by się odświeżać co 60s.Dodał to że ten skrypt chce zrobić do ts'a.

    mbc7ls.jpg

     

    Kilka taki znalazłem na kilku stronach tylko nie wiem jak to przerobić pod ts3, dodam jeszcze że parametr pod użytkowników na ts jest taki virtualserver_clientsonline , proszę o pomoc.

    <?php
    
    $randomquote = array(
        'My first quote!',
        'My second quote!',
        'My third quote!',
        'My fourth quote!',
        'My last quote!'
    );
    
    $image = 'signature_bar.png';
    $im = imagecreatefrompng($image);
    
    $main_color = imagecolorallocate($im, 51, 102, 153);
    $black = imagecolorallocate($im, 0, 0, 0);
    $orange = imagecolorallocate($im, 255, 85, 0);
    $blue = imagecolorallocate($im, 68, 102, 136);
    $red = imagecolorallocate($im, 255, 0, 0);
    $green = imagecolorallocate($im, 0, 160, 0);
    
    $left_margin = 10;
    
    imagestring($im, 3, $left_margin, 2, 'My wonderful name!', $orange);
    imagestring($im, 2, $left_margin, 18, 'Another text example...', $main_color);
    imagestring($im, 2, $left_margin, 30, 'Ok, another one!', $blue);
    imagestring($im, 1, $left_margin, 48, $randomquote[rand(0, sizeof($randomquote) - 1)], $green);
    
    header('Content-Disposition: filename=signature_bar.png');
    header('Content-Type: image/png');
    imagepng($im);
    imagedestroy($im);
    
    

  4. Witam, zrobiłem tak jak jest w tym poście i ładuje się tak samo długo jak wcześniej, moje błędy:

    
    Err http://ftp.pl.debian.org squeeze Release.gpg
      Could not resolve 'ftp.pl.debian.org'
    Err http://ftp.pl.debian.org squeeze-updates Release.gpg
      Could not resolve 'ftp.pl.debian.org'
    Err http://security.debian.org squeeze/updates Release.gpg
      Could not resolve 'security.debian.org'
    Reading package lists... Done
    W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/Release.gpg  Could not resolve 'ftp.pl.debian.org'
    
    W: Failed to fetch http://security.debian.org/dists/squeeze/updates/Release.gpg  Could not resolve 'security.debian.org'
    
    W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/Release.gpg  Could not resolve 'ftp.pl.debian.org'
    
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    
    

  5. Witam, szukam interejsu graficznego który bedzie brał mało ramu oraz procesora.

    Korzystałem wcześniej z xfce4-goodies i lxde ale nie wiem dla czego vnc4server dużo brał mi strasznie duzo ramu i procesora.

    Jaki wy macie sugestie bądź propozycje godne polecenia ?

     

    Pozdrawiam

    Mateusz

×