ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์CMS & Free Scriptช่วยแก้ไขรหัสลับจากตัวเลขให้เป็นตัวภาษาอังกฤษให้หน่อยครับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: ช่วยแก้ไขรหัสลับจากตัวเลขให้เป็นตัวภาษาอังกฤษให้หน่อยครับ  (อ่าน 1335 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
เทพมังกร
Verified Seller
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 37
ออฟไลน์ ออฟไลน์

กระทู้: 1,314



ดูรายละเอียด
« เมื่อ: 21 พฤษภาคม 2009, 10:58:59 »

โดน spam มาครับ รหัสตัวเลขเอาไม่อยู่ เลยจะเปลี่ยนเป็น ตัวภาษาอังกฤษแทน ช่วยหน่อยนะครับ

โค๊ด:
<?php


ini_set
("session.use_trans_sid",0);
error_reporting(E_ALL & ~E_NOTICE);

session_start();
session_register("secret_number");

function 
mt() {
list($usec$sec) = explode(' 'microtime());
return (float) $sec + ((float) $usec 100000);
}

header("Content-type: image/png");
$im=@imagecreate(10126);
$w=imagecolorallocate($im255255255);
$g1=imagecolorallocate($im192192192);
$g2=imagecolorallocate($im64,64,64);
srand(mt());$c1=rand(0,128);srand(mt());$c2=rand(0,128);srand(mt());$c3=rand(0,128);$cl1=imagecolorallocate($im,$c1,$c2,$c3);
srand(mt());$c1=rand(0,128);srand(mt());$c2=rand(0,128);srand(mt());$c3=rand(0,128);$cl2=imagecolorallocate($im,$c1,$c2,$c3);
srand(mt());$c1=rand(0,128);srand(mt());$c2=rand(0,128);srand(mt());$c3=rand(0,128);$cl3=imagecolorallocate($im,$c1,$c2,$c3);
srand(mt());$c1=rand(0,128);srand(mt());$c2=rand(0,128);srand(mt());$c3=rand(0,128);$cl4=imagecolorallocate($im,$c1,$c2,$c3);

for (
$i=0;$i<=100;$i+=5imageline($im,$i,0,$i,25,$g1);
for (
$i=0;$i<=25;$i+=5imageline($im,0,$i,100,$i,$g1);

imagestring($im50+rand(0,10), 5+rand(-5,5), substr($_SESSION["secret_number"],0,1), $cl1);
imagestring($im525+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],1,1), $cl2);
imagestring($im550+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],2,1), $cl3);
imagestring($im575+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],3,1), $cl4);

for (
$i=0;$i<2;$i++) imageline($im,rand(0,100),rand(0,25),rand(0,100),rand(0,25),$g2);

imagepng($im);
imagedestroy($im);
?>

บันทึกการเข้า

โอกาสไม่ได้มีไว้สำหรับทุกคน แต่โอกาสไว้เสมอสำหรับคนที่ไขว่คว้า If you touch me soft and gentle, If you look at me and smile. If you listen to me talk. Sometime before you talk, I will grow really grow.มีสติ เท่ากับมีสตางค์ Think big. Get big.
หน้า: [1]   ขึ้นบน
พิมพ์