ÎÒµÄ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();
?>
Ïà¹ØÎĵµ£º
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->formatOutput = true;
$root = $doc->createElement('document'); //´´½¨¸ù
$doc->appendChild($root); //¼ÓÈë¸ù
//webSite
$webSite = $doc->createElement('webSite');
$webSite->appendchild($doc ......
http://fw.qq.com/ipaddress·µ»ØÀàËÆ£ºvar IPData = new Array("61.51.71.183","","±±¾©ÊÐ","");
<?php
function get_ip_place(){
$ip=file_get_contents(http://fw.qq.com/ipaddress);
$ip=str_replace('"',' ',$ip);
$ip2=explode("(",$ip);
$a=substr($ip2[1],0,-2);
$b=explode(",",$a);
return&n ......
<?
$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 ......
¡¡¡¡php ×÷Ϊ“×î¼òµ¥”µÄ Web ½Å±¾ÓïÑÔ, ÔÚ¹úÄÚµÄÊг¡Ô½À´Ô½´ó£¬phper Ô½À´Ô½¶à£¬µ«ÊǸоõ´ó¶àÊýÈ˺ÃÏñûÓп¼Âǵ½Ä£Ê½ÎÊÌ⣬ʲôÑùµÄÉè¼ÆÄ£Ê½²ÅÊÇ×îÓŵ쬲ÅÊÇ×îÊʺÏ×Ô¼ºÄ¿Ç°¹¤×÷µÄ£¬±Ï¾¹Ð§ÂÊÊÇ×îÖØÒªµÄ£¨ÓÃʡϵÄʱ¼ä´òÓÎÏ·£¬¶àÃÀ°¡...£©¡£MVC Ó¦¸ÃÊÇÊ×Ñ¡£¬www.sourceforge.net ÉÏÓкöàÓÅÐãµÄ»ùÓÚ MVC µ ......
//ÉÏ´«Îļþ
$dir="../upfile/jianli";
set_time_limit(0);
extract($_FILES);
if(!empty($res_clett["name"])){
$upfile=&$HTTP_POST_FILES['con_pdf'];
$upfileEx=substr($upfile['name'],-3);
$tmp_name=date("YmdGhis").'.'.$upfileEx;
&nb ......