Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÎÒµÄphpÑéÖ¤ÂëÀà


<?php
/*
 * Created on 2010-3-11
 * author:zhangfei
 *ÎÒµÄÑéÖ¤ÂëÀà
 */
 session_start();
 class Check_Class{
  public $h_img ;
public $c_back ;
public $c_front ;
//¹¹Ô캯Êý
function Check_Class(){
$h_img  =  imagecreate(100,30);
$c_back  =  imagecolorallocate($h_img,0,0,0);
$c_front  =  imagecolorallocate($h_img,255,255,255);
$_SESSION[randstr]=$randm_string = $this->random(5);//ÓÃsession±£´æÆðÀ´ÓÃÒÔºóÃæÅжÏ
$this->getLine($h_img);
$this->getPoint($h_img);
$this->paintString($h_img,$randm_string,$c_front);
//ÏÔʾͼƬ
header("Content-type:  image/jpeg");
imagejpeg($h_img);
imagedestroy($h_img);
}
  //²úÉúËæ»ú×Ö·û´®£¬°üÀ¨Êý×ֺʹóСд×Öĸ
  function random($length)
{
   $hash = "";
   $chars = "CEFGHIJKLMNOPQRSTUVWXYZ0123456789cefghijklmnopqrstuvwxyz";
   $max = strlen($chars) - 1;
   mt_srand((double)microtime() * 1000000);
   for($i = 0; $i < $length; $i++)
   {
       $hash .= $chars[mt_rand(0, $max)];
   }
   return $hash;
}
//»­¸ÉÈÅÏߵĺ¯Êý
function getLine($h){
for($j=0;$j<5;$j++){
//¶¨ÒåÏßÌõ
$c_line = imagecolorallocate($h,rand(0,255),rand(0,255),rand(0,255));
//ÔÚͼƬÉÏ»®Ïß
imageline($h,rand(0,100),rand(0,30),rand(0,100),rand(0,30),$c_line);
}
}
//»­Ôëµã
function getPoint($h){
for($ii=0;$ii<400;$ii++){
$c_point = imagecolorallocate($h,rand(0,255),rand(0,255),rand(0,255));//¶¨ÒåÔëµãÑÕÉ«
imagesetpixel($h,rand()%100,rand()%30,$c_point);
}
}
//»­×Ö·û´®
function paintString($h,$rd_str,$c_f){
imagestring($h,rand(4,6),rand(1,50),rand(1,15),$rd_str,$c_f);
}
 }
 $chek = new Check_Class();
?>


Ïà¹ØÎĵµ£º

Ãâ·ÑPHP¿ªÔ´CMSÍøÕ¾³ÌÐò

10¿î»ùÓÚPHPµÄÃâ·ÑCMS£¬ÏëҪͨ¹ýPHP+MYSQL´î½¨ÍøÕ¾µÄÅóÓÑ¿ÉÒÔ´ÓÖвο¼¡£
1. Joomla!
Joomla! µÄÇ°ÉíÊÇMamboµÄ¿ªÔ´Âë¼Æ»®£¬
2. Drupal
Ö±±ÆJoomla!µÄ¿ªÔ´CMS£¬²»¹ýòËÆÓû§Èº»¹ÊÇûÓÐJoomla!¶à¡£
3. Mambo
ÆóÒµÀàCMSÍøÕ¾¿ÉÒÔÑ¡Ôñ£¬¸öÈË»¹ÊÇÓÃJoomla ºÃÁË¡£
4. DEDECMS
ÕâËã¹úÄÚ×îÖªÃû¡¢Ê¹ÓÃÈËÊý×î¶àµÄCMSÁË°É¡£ÎÞÊýÀ ......

PHPÕýÔò±í´ïʽƥÅä²¢Êä³öÊý×é(×öС͵³ÌÐòºÜÓÐÓÃ)

ÓÐÕâôһ¶ÎHTML£¬±È½Ï²»¹æÔòµÄ£¬Èç¹ûÒªÌáÈ¡ÆäÖеÄÁ´½ÓµØÖ·ºÍÁ´½ÓÃû³Æ£¬ÔõôŪ£¿ ÄÚÈÝÀ´×Ôdedecms
//HTML
$str = '<a id="top8" href="http://list.mp3.baidu.com/song/A.htm?top8" class="p14" target="_top">¸èÇúÁбí</a><br><a target="_blank" id="bp" href="http://list.mp3.baidu.com/list/ba ......

Ç¿´óµÄPHPαÔìIPÍ·¡¢Cookies¡¢Reference¡­¡­

<?
$fp = fsockopen ("passport.baidu.com", 80,
$errno, $errstr, 30);
if (!$fp) {
echo "$errstr
($errno)<br>\n";
} else {
$msg="GET
/?login&username=lapiaotuan22&password=oyhz123456
HTTP/1.0\r\n";
$msg.="Host:passport.baidu.com \r\n&quo ......

7ÖÖÁ÷ÐÐPHP¼¯³É¿ª·¢¹¤¾ß(IDE)µÄ±È½Ï

ʲôÊÇ IDE?
¡¡¡¡¼ò¶øÑÔÖ®£¬IDE Ϊ±àÂ빤×÷ÌṩÁËһվʽ·þÎñ¡£IDE °üÀ¨Ò»¸ö±à¼­Æ÷£¬Ôڴ˱༭Æ÷ÄÚ¿ÉÒԱ༭´úÂë¡¢µ÷ÊÔ´úÂë¡¢ÔÚä¯ÀÀÆ÷(ͨ³£ÊÇǶÈëʽµÄ)Öв鿴´úÂëºÍÇ©ÈëºÍÇ©³öÔ´Âë¿ØÖÆ¡£ÎªÁËÖ§³ÖÕâЩ¹¦ÄÜ£¬IDE ÓµÓÐÒ»Ì×ÔÚ»ù±¾±à¼­Æ÷(±ÈÈç¼Çʱ¾»òÕß Vim)ÖÐËùÕÒ²»µ½µÄÌØÐÔ¡£µ±È»£¬Äú¿ÉÒÔͨ¹ýÀ©Õ¹±à¼­Æ÷À´ÊµÏÖÕâЩ¹¦ÄÜ£¬µ«ÊÇ ID ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ