1

(2 replies, posted in (x)HTML ir CSS)

Norėčiau sužinoti kaip galima padaryti permatomą div su balta background, bet jame esantis kitas div nebūtų permatomas.

Pavyzdys jei neaišku ką čia šneku: http://piratai.net dešinėje, kur logotipe patinka mygtukas. Norėčiau, kad jis būtų ant permatomo balto bg, bet pats nebūtų permatomas.

Bandžiau, bet vis nepavyksta - like mygtukas irgi permatomas gaunasi, nesvarbu kad z-index dedu, vistiek.

2

(8 replies, posted in (x)HTML ir CSS)

žinau, kad daug noriu ir nieko nežinau apie js, bet man žiauriai reikia :D. Negi niekas negalite bent pataisyti kodo (suprantu skamba kvailokai), argi nėra paprastos išeities? ;/

3

(8 replies, posted in (x)HTML ir CSS)

Nu savotiskai, ten yra turbut koks linkas, nezinau, gal kas pagoreguoti galetu, ar bent jau padet..

4

(8 replies, posted in (x)HTML ir CSS)

Reklama veikia, ads sistema puiki. Bet kur ikisus si koda viskas ciki, bet nesupratai problemos. As noriu, kad paspaudus ant sios reklamos esancios div bloke, pasirodytu foo elementas... Bet kur div'e paspaudus, tik ne ant scripto, viskas suveikia.

5

(8 replies, posted in (x)HTML ir CSS)

Sveiki, noriu sukurti tokį dalyką show hide. Padariau, kad paspaudus tekstą pasirodo tam tikras div elementas. Iškilo problema - noriu sukurti tokį div, kuriame paspaudus javascript kodą išlystų elementas. Va kodas:

<div style="height:60px; width:468px;" onclick="toggle_visibility('foo');">

<!-- PantherAds PPC Service - ad code starts -->
<span id="show_ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5_2597"></span>
<script language="javascript" type="text/javascript" src="http://pantherads.com/show-ads.js"></script>
<script language="javascript">
if (window.ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5 ){ ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5+= 1;}else{ ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5 =1;}
ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5_2597=ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5;
timer_26cd66f8e5c57dc64cc8f6c6d66d9fa52597=window.setInterval(function(){
if(window.gc4ca4238a0b923820dcc509a6f75849b){
setTimeout("showAdsforContent(2597,468,60,'http://pantherads.com/publisher-show-ads.php',"+ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5_2597+",'ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5')",1000*(ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5_2597 -1));
window.clearInterval(timer_26cd66f8e5c57dc64cc8f6c6d66d9fa52597);}},100);
ads_26cd66f8e5c57dc64cc8f6c6d66d9fa5_2597_position=0;
</script>
<!-- PantherAds PPC Service - ad code  ends -->

</div>

Viskas veikia jeigu vietoje javascript įrašau tekstą ar ką kitą, arba padidinu div kelias px ir juos paspaudžiu (išleda foo elementas). Bet kodėl jis neišlenda paspaudus ant javascript banerio, kuris užsikrauna šio kodo dėka? ;/ Gal kas turite patirties ar žinių apie tai?

6

(3 replies, posted in PHP)

O kas čia blogai? :)

7

(3 replies, posted in PHP)

Turiu scriptą, pats perdariau:


<?php
        
$con = mysql_connect("localhost","JUSU MYSQL USER","PASS");
if (!$con)
   {
   die('Could not connect: ' . mysql_error());
   }

mysql_select_db("JUSU DATABASE", $con);


$to = $_GET['wp_to'];

        $sms = $_GET['wp_sms'];

        $amount = $_GET['wp_amount'];

        $from = $_GET['wp_from'];

        $operator = $_GET['wp_operator'];
       
        if(!empty($to) ||!empty($sms) || !empty($amount) || !empty($from) || !empty($operator))
{
           $sms = str_replace("$","$$",$sms);
           $sms = str_replace("|","l",$sms);

        $arr = array("^","%","\n");

       $sms = str_replace($arr,"",$sms);
       $sms = htmlspecialchars($sms);
      
       echo "Sveikiname! Jus sekmingai uzsisakete reklama.";
      
       $temp = explode(" ",$sms);
$raktazodis = $temp[0];
$url = $temp[1];
unset($temp[0]);
unset($temp[1]);
$antraste = implode(" ",$temp);

  mysql_query("INSERT INTO dle_smsreklama (url, img)
VALUES ('$url','$antraste')");

mysql_close($con);

}
?>


Kaip padaryti, kad šitas kodas priimtų tik $url iš žinutės (man $antraste nereikia). Gal kas žinote, kurią vietą reikia ištrint / pakeist?

Dėkui

8

(11 replies, posted in PHP)

Susitvarkiau, pasirodo reikia parasyt limit 5 :)

9

(11 replies, posted in PHP)

Ai jo, rimtai. Pamirsau, kad man reikia atvaizduot 5. Kaip tai galima padaryt?

10

(11 replies, posted in PHP)

Veikia su md5 pavyzdziu, tik nereikia duplikuoti reklama variable ;) Aciu

11

(11 replies, posted in PHP)

Skuelas, metą klaidą Unexpected = on 28 line

12

(11 replies, posted in PHP)

Ai select * reiskia atvaizduoti visus? :) Ar ne? Jei ne, paaiškinti gali?

13

(11 replies, posted in PHP)

Pakūriau kodą pagal tutorialus, kaip ir ok, tik problema, kad row rodo tik vieną rezultatą, nors mysql yra jų net trys

mysql_select_db("aragornas_2", $con);

 $result = mysql_query("SELECT * FROM dle_smsreklama");

 while($row = mysql_fetch_array($result))
   {

$url = $row['url'];
$img = $row['img'];

   $reklama = "<center><a href=\"http://$url\" target=\"_blank\"><img src=\"http://$img\" width=\"128\" height=\"60\" /></a><br/></center>";
   
   
   }

Gal kas žinote kur klaida? Būčiau dėkingas jei rastumėte :) Beje, norėčiau, kad rodytų max 5 rezultatus pagal naujiškumą (nuo naujausio)

14

(3 replies, posted in PHP)

Tiktų, esmė ta, ar jis scrapintų bet kokį psl, net jei duotum skirtingus

15

(2 replies, posted in PHP)

Bandau pasidaryt: pasidarau xvalue, jei žinai kas tai yra, pasidarau iframe su xvalue, pasidarau html formą, kurios dėka uploadinu į tam tikrą folderį torrentus. Viskas veikia, failas nuskaito ir rodo. Bet problema yra su multitrackeriais. jeigu pirmasis trakeris neveikia, jis nesumuoja kitų trackerių seed. Aš nežinau, kaip padaryti, kad jis nuskaitytų visus įmanomus trakerius

16

(3 replies, posted in PHP)

Ar įmanomas toks scriptas, kurio adresas atrodytų maždaug taip:

http://adresas.lt/torrent_check.php?fil … as.torrent

Jo paskirtis būtų įeiti į torrent failą ir pascrapinti seed ir leech skaičių, ir juos išvesti kintamajame.

Pvz:

įeinu į adresą http://adresas.lt/torrent_check.php?fil … as.torrent ir man išmeta: pavadinimas, seed, leech, parsisiuntimų.



Gal kas turite panašų scriptą, ar bent jau žinote nuo kur reikėtų pradėt kurti? Dėkui

17

(2 replies, posted in PHP)

Sveiki, turiu problemą. Bandau pasidaryt seed ir leech checkinimą dle sistemai. Radau tokį modą, torrent scraper (2.2). Vienu žodžiu, šis kodas apdoroja torrentą ir jį išveda. Bet yra problema. Jis neišveda seed ir leech skaičiaus kai:
-Pagrindinis trakeris yra neveikiantis.

Gal kas iš programišių pakeistų dalį kodo, kad jis išvestų seed ir leech  skaičių visada, susumavęs visų (veikiančių ir ne) seed ir leech. Išvestų jį į kintamajį.

Ačiū jei kas įstengsite, nes aš esu žalias ir nesamonių pridarau :)

<?php
/*
This file is part of TorrentParse 2.1.

    TorrentParse is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    TorrentParse is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with TorrentParse; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    TorrentParse. TorrentParse parses bittorrent torrent files in PHP for use in web sites.
    Copyright (C) 2004 TorrentNews.tk

System Requirements:
PHP 4.*.* with sha1 function
Written on PHP 4.3.4
Untested on any other version

This code is not designed to give the smallest filesize, operate as fast as possible.
It is designed so as little can go wrong as possible, which to me is the most important thing.
This can be cleaned up a lot and made faster too
Based on BEncode, BDecode from PHPBTTRACKER.
Uses code snippets from DUMPTORRENTCGI.PHP.
PHPBTTRACKER is licenced under the GPL
Each term has been assigned a variable so that it can be used for further processing

CHANGES
Many more torrent variables added (mostly TorrentAid hashes)
"File cannot be found error", "File cannot be opened" and "File not Valid" errors added
function checkarray() added to reduce the amount of if((isset))s.
Name changed to "Internal File name" to reduce confusion

*/

// Please Change $seedsandpeers to TRUE or FALSE if you want seeds and peers to be checked

$seedsandpeers = TRUE;

// End of config area
error_reporting  (0);

function pathurlencode($uri) {
        $uri = urlencode($uri);
        $uri = str_replace('%3A', ':', $uri);
        $uri = str_replace('%2F', '/', $uri);
        $uri = str_replace('%26', '&', $uri);
        $uri = str_replace('%40', '@', $uri);
        $uri = str_replace('%3A', ':', $uri);
        $uri = str_replace('%3F', '?', $uri);
        $uri = str_replace('%3D', '=', $uri);
        $uri = str_replace('%5B', '[', $uri);
        $uri = str_replace('%5D', ']', $uri);
        return $uri;
    }
    // From php.net
    function getfilesize($bytes) {
   if ($bytes >= 1099511627776) {
       $return = round($bytes / 1024 / 1024 / 1024 / 1024, 2);
       $suffix = "TB";
   } elseif ($bytes >= 1073741824) {
       $return = round($bytes / 1024 / 1024 / 1024, 2);
       $suffix = "GB";
   } elseif ($bytes >= 1048576) {
       $return = round($bytes / 1024 / 1024, 2);
       $suffix = "MB";
   } elseif ($bytes >= 1024) {
       $return = round($bytes / 1024, 2);
       $suffix = "KB";
   } else {
       $return = $bytes;
       $suffix = "Byte";
   }
   if ($return == 1) {
       $return .= " " . $suffix;
   } else {
       $return .= " " . $suffix . "s";
   }
   return $return;
}

 function Parse($filename) {
        require_once("BDecode.php") ;
        require_once("BEncode.php") ;
            global $seedsandpeers;
       $torrent = explode(".", $filename);
    $fileend = end($torrent);
    $fileend = strtolower($fileend);
if ( $fileend == "torrent" ) {
// It is important that ./torrents/ exists or else someone can pass a string to read /etc/passwd like people have been doing on the homepage
$stream = @file_get_contents("./torrents/$filename");
if ($stream == FALSE) {
echo "$filename cannot be opened" ;

}
if(!isset($stream)){
echo "Error in Opening file." ;
    }else{
            $array = BDecode($stream);
if ($array === FALSE){
echo "Error in file. Not valid BEncoded Data." ;

}else{
if(array_key_exists("info", $array) === FALSE){
echo "Error in file. Not a valid torrent file." ;

}else{

// Displays File Name
echo "Torrent Filename: "        ;
echo $filename ;
// Torrent Tracker
              echo "<br>Torrent Announce URL: ";
        $announce = $array["announce"];
        echo $announce;

                             if (isset($array["announce-list"])){
                echo "<br>This Torrent also has several backup trackers";

              // Loops through the list of Backup Trackers
                foreach ($array["announce-list"] as $alist)
                {
                echo "<br>Tracker: ";
                 echo $alist[0];
                          }
                }

        // Stores 2D array as variable. The whole of $array['info'] is now called as $infovariable
        $infovariable = $array["info"];
             // Calculates SHA1 Hash
                      echo "<br>Torrent Info Hash: ";
      $infohash = sha1(BEncode($infovariable));
       echo $infohash ;
            //Calculates EDonkey2000 hash (ED2K) if present
      if (isset($infovariable["ed2k"])){
              $ed2k = $infovariable["ed2k"];
              $hexed2k = bin2hex($ed2k);
               echo "<br>Edonkey2000 Hash: ";
              echo $hexed2k;                            }
            // Prints MD5SUM if present
     if (isset($infovariable['md5sum'])){
                echo "<br>MD5SUM: ";
                echo $infovariable['md5sum'];
                }
        if (isset($infovariable['sha1'])){
                echo "<br>SHA1 Hash (TorrentAid): ";
                $hexsha1 = bin2hex($infovariable["sha1"]);
                echo $hexsha1 ;
                }
      // Calculates date from UNIX Epoch
      echo "<br>Torrent Creation Date: ";
    $makedate = date('r' , $array["creation date"]);
echo $makedate ;
   // The name of the torrent is different to the file name
   echo "<br>Internal Filename of Torrent: " ;
    echo $infovariable['name'] ;

if (isset($infovariable["files"]))  {
echo "<br>This is a Multifile Torrent" ;
$filecount = "";
      foreach ($infovariable["files"] as $file)
                        {
                         $filecount += "1";
                        // Loops through multifile torrent names
                                 echo "<br>";
                                 echo $filecount;
                                 echo ": File Name: ";
                         $multiname = $file['path'];
                         echo $multiname[0];
                         echo ". File Size: " ;
   $multitorrentsize = $file['length'];
   echo getfilesize($multitorrentsize) ;
   $torrentsize += $file['length'];
       if (isset($file["ed2k"])) {
     echo "<br>Edonkey2000 Hash: ";
             $multied2k = bin2hex($file["ed2k"]);
             echo $multied2k ;
                         }
             if (isset($file["sha1"])) {
             echo "<br>SHA1 Hash: ";
             $multisha1 = bin2hex($file["sha1"]);
            echo $multisha1 ;

                        }
                         if (isset($file["MD5SUM"])) {
             echo "<br>MD5SUM: ";
             $multimd5 = bin2hex($file["MD5SUM"]);
           echo $multimd5;


                        }

                        } echo "<BR>Combined File Size: ";
                                echo getfilesize($torrentsize);

        }
        else {
        // Calculates File size in KB and rounds to 2 decimal places
       echo "<br>File Size: ";
       $torrentsize = $infovariable['length'];
       echo getfilesize($torrentsize);
        }
   // Calculates Piece Size in KB
   echo "<br>Piece Size: " ;
   echo getfilesize($infovariable['piece length']);


   // For terms that are only included in certain torrent files (Mostly TorrentAid)
if(isset($array['comment'])) {
echo "<br>Torrent Comment: " ;
echo $array['comment'];
}
if(isset($array['created by'])) {
echo "<br>Torrent Created By: " ;
echo $array['created by'] ;
}
if(isset($array['encoding'])) {
echo "<br>Torrent Encoding: " ;
echo $array['encoding'] ;
}
if(isset($array['user-agent'])) {
echo "<br>Torrent File Creator: " ;
echo $array['user-agent'];
}
if(isset($array['httpseeds'])) {
foreach ($array["httpseeds"] as $httpseed)
                        {
                                  echo "<br>Webseed URL: " ;
                                 echo $httpseed;
}
}
// global $seedsandpeers;
if ($seedsandpeers === TRUE){
if (isset($array["announce"])){
$announce = $array["announce"];
// Possibly HtTp://
$announce = strtolower($announce);
if (substr($announce, 0, 7) === "http://"){
if ((substr_count($announce, "/announce")) == 1){
$scrape = str_replace('/announce', '/scrape', $announce);
$httpget = "?info_hash=";
$binsha1 = pack("H*", $infohash);
$binsha1s = addslashes($binsha1);
$fullurl = "$scrape$httpget$binsha1";
$httpurl = pathurlencode($fullurl);
sapeerconnect($httpurl, $binsha1s, $torrentsize);
}  else {
$error = "<BR>Bad Tracker URL for scraping (Maybe trackerless torrent)." ;
echo $error;
}
}
else {
$error = "<BR>Bad Tracker URL for scraping (Maybe trackerless torrent)." ;
echo $error;
}
}
}
        }
}
}
}


}

function sapeerconnect($httpurl, $binsha1s, $torrentsize) {
   // Code from yabtuc-0.4.1
$fp = fopen($httpurl, "rb");
$stream = "";
        if ($fp) {
            while( !feof( $fp ) ) {
                $stream .= @fread($fp, 128);
}
}
fclose($fp);


if($fp === FALSE){
$error = "<BR>No Response From Tracker. Please Try Again." ;
echo $error;
}
else{

$decoded = BDecode($stream);
if ($decoded["files"] === TRUE) {
$error = "<BR>File not present on tracker (torrent may be dead).";
echo $error;
}
else
{
$files = $decoded["files"];
$sha1tor = $files[$binsha1s];
if(isset($files[$binsha1s])) {


echo "<BR>Seeds:";
echo $sha1tor['complete'];
echo "<BR>Peers:";
echo $sha1tor['incomplete']  ;
// FBT2 shows no completed downloads and others
if(isset($sha1tor['downloaded'])){
echo "<BR>Completed Downloads:";
echo $sha1tor['downloaded'];
if(isset($torrentsize)){
// Something to try and calculate some bandwidth figures
$bandwidth = $sha1tor['downloaded'] * $torrentsize ;
echo "<BR>Estimated Total Bandwidth used in downloading: ";
echo getfilesize($bandwidth);
}

}
}
else
{
$error = "<BR>Error with tracker response." ;
echo $error ;
}
}



}


}

// Checks to see that a torrent name is in GET
if (isset($_GET['filename']))  {
              Parse($_GET['filename']);
      }
                else {
                           echo "No torrent name has been specified. Please Specify One.";
                }

?>

18

(6 replies, posted in Visa kita)

Tai niekas negalite iškoduoti. Jei ką čia md5 koduotė, panaudote minecraft bukkit plugine authme 0.72

19

(6 replies, posted in Visa kita)

Padėkite išversti šį md5 į tekstą, niekaip neišeina.

aragornas124:$SHA$3fe0fe40c52beb70$a142fd07c30a6df0a18d261b0890cba8ce54f6595e3c651f68a113b14633799b

20

(2 replies, posted in PHP)

Dėkui