From: "Aleksander N.Gorohovski" <angel@feht.dgtu.donetsk.ua> To: "ALT Linux Community general discussions" <community@lists.altlinux.org> Subject: Re: [Comm] пакет(модуль) графического кода Date: Wed, 23 Jan 2008 09:03:56 +0200 Message-ID: <op.t5de8ubxmb8vzs@oc.peooc.net> (raw) In-Reply-To: <4796E533.7050909@mail.ru> On Wed, 23 Jan 2008 08:56:51 +0200, Konstantin. A. Bylym wrote: > Aleksander N.Gorohovski пишет: >> On Mon, 21 Jan 2008 12:14:15 +0200, Konstantin. A. Bylym wrote: >> >>> Aleksander N.Gorohovski пишет: >>> >>>> Ну, а у вас получилось сотворить? >>>> или это теория. >>>> :) >>> Да ) Если потерпите до завтра, то принесу и отправлю (скрипт дома) >> Конечно. >> Спасибо. Интересно было бы посмотреть. > Сперва извинения. Позавчера у старшего сына и младшей дочки были ДР, так > что к компьютеру добраться не удалось. Ух! Повезло ж Вам. Примите и мои поздравления :) > Теперь --- обещанное: Премного благодарен. :) Буду разбираться > $ cat ./captcha.php > <?php > $com = <<<END > convert -size 160x36 xc:transparent -mattecolor green -frame 2x2 -font > FreeSerif -pointsize 30 -fill navy\\ > END; > $x = 2; > $nam = ''; > srand(time()); > for( $i = 0; $i < 6; $i++) > { > $y = 30 + (rand()%6); > $p = ""; > > switch(rand(1,3)) > { > case 1: $p = chr(rand(48,57)); break; //0-9 > case 2: $p = chr(rand(65,90)); break; //A-Z > case 3: $p = chr(rand(97,122)); break; //a-z > } > $nam .= $p; > $com .= " -draw \"text $x,$y '$p'\""; > $x += 22; > } > $pnam = md5($nam); > $com .= " tmp/tmp.png\n"; > system($com); > system("convert -swirl 30 tmp/tmp.png tmp/".$pnam.".png"); > //system("convert -wave 2x25 tmp/tmp.png tmp/".$pnam.".png"); > ?> > <html> > <head></head> > <body> > <p><img src="tmp/<?php print $pnam ?>.png"> > </body> > </html> > > За качество кода прошу извинить. Да и писалось оно практически на спор ;) >
next prev parent reply other threads:[~2008-01-23 7:03 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-21 7:18 Aleksander N.Gorohovski 2008-01-21 9:33 ` Konstantin. A. Bylym 2008-01-21 9:49 ` Aleksander N.Gorohovski 2008-01-21 10:14 ` Konstantin. A. Bylym 2008-01-21 10:17 ` Aleksander N.Gorohovski 2008-01-23 6:56 ` Konstantin. A. Bylym 2008-01-23 7:03 ` Aleksander N.Gorohovski [this message] 2008-01-21 21:38 ` [Comm] пакет ( модуль ) " ABATAPA 2008-01-21 9:50 ` [Comm] пакет(модуль) " Aleksander N.Gorohovski 2008-01-22 9:11 ` lnkvisitor.ts
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=op.t5de8ubxmb8vzs@oc.peooc.net \ --to=angel@feht.dgtu.donetsk.ua \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git