Jump to content

moubik

Active Members
  • Posts

    1261
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by moubik

  1. copii voi va uitati la data cand postati pe un forum?Dati-va 2 palme sa nu va dau eu

    c2EgbGUgZGVhIGNpbmV2YSB1biAiaGFjayB0cmlidXJpbGUiIEZVRCA6KQ==

    esti putin cam agitat. lasa oamenii sa se obisnuiasca pe site

    ----

    bmljaSBudSB0cmVidWllIHNhIGZpZSBGVUQgOik=

  2. din cate stiu merge doar pe tipurile acestea de fisiere.

    tehnica este veche si cunoscuta.

    se poate face acest lucru pentru ca headerul de la jpeg este la inceputul fisierului si headerul mp3-ului este la sfarsitul fisierului. din acest motiv atunci cand le concatenezi nu se strica informatiile care descriu structura datelor din fisier.

  3. Salut , Bine v-am gasit!!

    ZeroDark 18 ani Bucuresti

    Limbaje de programare care le-am studiat:Java,php,c++,pearl.

    Am studiat mai multe dar astea le stiu si nu are rost sa le pun pe cele care le cunosc foarte putin :).

    sunt curios ce studiat la limbajul "pearl"

  4. va dau si eu codul meu pentru captcha

    asa arata

    captchacc2.png

    aveti nevoie de un .ttf ca sa iti deseneze literele asa cum vrei tu.

    puteti alege dintre cele de aici

    http://www.webpagepublicity.com/free-fonts.html

    valoarea corecta a captcha-ului cu care trebuie sa faceti compariatia este in $_SESSION['human']


    <?php
    include ('config.php');

    $_SESSION['human'] = '';

    for ($i=0 ; $i < 6 ; $i++ )
    {
    $_SESSION['human'] .= strtoupper(chr(rand(97,122)));
    }

    $imageX = 160;
    $imageY = 40;

    $captcha = imagecreatetruecolor($imageX, $imageY);

    for ($i=0 ; $i < $imageX; $i++)
    {
    $circleColor = imagecolorallocate($captcha, rand(0, 255), rand(0, 255), rand(0, 255));
    imageellipse($captcha, rand(0, $imageX), rand(0, $imageY), rand($imageX / 10, $imageX / 10 * 2), rand($imageX / 10, $imageX / 10 * 2), $circleColor);
    }

    for ($i=0 ; $i < $imageX; $i++)
    {
    $circleColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(75, 127));
    imagefilledellipse($captcha, rand(0, $imageX), rand(0, $imageY), $imageX / 10, $imageX / 10, $circleColor);
    }


    $font = 'font/matrix.ttf';
    $fontSize = 25;
    $angle = 0;
    $box = imagettfbbox($fontSize, $angle, $font, $_SESSION['human']);
    $ttfX = (int) rand( 0, $imageX / 6 );
    $ttfY = $imageY / 2 + $imageY / 4;

    $k=0;
    while($k < strlen($_SESSION['human']))
    {
    $angle = ((rand(0,1) == 0) ? rand(0, 20) : rand(340, 360));
    $ttfColor = imagecolorallocate($captcha, rand(0, 50), rand(0, 50), rand(0, 50));
    imagettftext($captcha, $fontSize, $angle, $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]);
    imagettftext($captcha, $fontSize, $angle - rand(0, 5), $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]);
    imagettftext($captcha, $fontSize, $angle + rand(0, 5), $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]);
    $k++;
    }


    for ($i=0 ; $i < $imageX / 3; $i++)
    {
    $circleColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(115, 127));
    imagefilledellipse($captcha, rand(0, $imageX), rand(0, $imageY), rand($imageX / 10, $imageX / 10 * 2), rand($imageX / 10, $imageX / 10 * 2), $circleColor);
    }


    for ($i=0 ; $i < $imageX / 3; $i++)
    {
    $lineColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(100, 127));
    imageline($captcha, rand(0, $imageX), rand(0, $imageY), rand(0, $imageX), rand(0, $imageY), $lineColor);
    }



    header('Content-type: image/png');
    imagepng($captcha);
    imagedestroy($captcha);


    ?>

×
×
  • Create New...