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

PHPÊý×Ö¼ÓÃܽâÃÜÀà

<?php
/* ----------------------------------------------------------------------------
* Script Name: encrypt.php
* Creation Date: 2008-4-7 10:36
* Last Modified: 2008-4-12 16:00
* Author: meyu
* Copyright (c) 2007
* Purpose: Êý×Ö×Ö·û´®¼òÒ×¼Ó½âÃÜ
* ----------------------------------------------------------------------------*/
class Encryption {
/**
* ×îÖÕµÄÃÜÎÄ´úÂ룬¿ÉÉèΪÈÎÒâ²»ÖØ¸´µÄ10λӢÎÄ×Ö·ûa-zA-Z
*/
private $replacement = 'urskydMeIV';
/**
* Ôö¼ÓµÄÃÜÎĵÚһ룬¿ÉÉèΪ1λ³ý0ÒÔÍâµÄÕûÊý£¬¼´ 1-9
*/
private $prefix = "8";
/**
* ¹«Ô¿,³¤¶ÈСÓÚ8λµÄÕýÕûÊý
*/
private $match = "111111";
/**
* ת»»ºó¶ÔÕÕÊý×é
*/
private $replaceenc;
private $replacedec;
function __construct() {
for($i =0; $i < 10; $i++) {
$this->replaceenc['/'.$i.'/'] = $this->replacement{$i};
$this->replacedec['/'.$this->replacement{$i}.'/'] = $i;
}
}
public function encrypt($str) {
return preg_replace(
array_keys($this->replaceenc),
$this->replaceenc,
$this->mynotin(preg_replace("/(.)(.)/", "${2}${1}", $str))
);
}
public function decrypt($str) {
return preg_replace("/(.)(.)/", "${2}${1}",
$this->mynotout(preg_replace(array_keys($this->replacedec),$this->replacedec,$str))
);
}
private function mynotin($str) {
$str_out = "";
$i = 0;
while(isset($str{7*$i})) {
$str_out .= (($this->prefix.substr($str, $i*7, 7))+0)^$this->match;
$i++;
}
return $str_out;
}
private function mynotout($str) {
$str_out = "";
$i = 0;
while(isset($str{8*$i})) {
$str_out .= substr((substr($str, $i*8, 8)+0)^$this->match, 1);
$i++;
}
return $str_out;
}
}
?>


Ïà¹ØÎĵµ£º

php ÎļþÉÏ´«

ÔÚPHPÖУ¬ÎļþÉÏ´«Ò»°ãÊÇͨ¹ýmove_uploaded_file£¨£©À´ÊµÏֵġ£
bool move_uploaded_file ( string filename, string destination )±¾º¯Êý¼ì²é²¢È·±£ÓÉ filename Ö¸¶¨µÄÎļþÊǺϷ¨µÄÉÏ´«Îļþ£¨¼´Í¨¹ý PHP µÄ HTTP POST ÉÏ´«»úÖÆËùÉÏ´«µÄ£©¡£Èç¹ûÎļþºÏ·¨£¬Ôò½«ÆäÒÆ¶¯ÎªÓÉ destination Ö¸¶¨µÄÎļþ¡£
Èç¹û filename ²»ÊǺϷ ......

ʹÓÃÌÚѸµÄapi½Ó¿Ú£¬php»ñÈ¡ipµØÖ·ÒÔ¼°ËùÔÚ³ÇÊÐ

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 ......

phpÔ¶³Ì»ñȡͼƬ

<?php
//
// Function: »ñȡԶ³ÌͼƬ²¢°ÑËü±£´æµ½±¾µØ
//
//
// È·¶¨ÄúÓаÑÎļþдÈë±¾µØ·þÎñÆ÷µÄȨÏÞ
//
//
// ±äÁ¿ËµÃ÷:
// $url ÊÇÔ¶³ÌͼƬµÄÍêÕûURLµØÖ·£¬²»ÄÜΪ¿Õ¡£
// $filename ÊÇ¿ÉÑ¡±äÁ¿: Èç¹ûΪ¿Õ£¬±¾µØÎļþÃû½«»ùÓÚʱ¼äºÍÈÕÆÚ
// ×Ô¶¯Éú³É.
function GrabImage($url,$filename="") { ......

¼èÄѵľñÔñ£ºPHPÓëASPµÄ×ۺϱȽÏ

ʲôÊÇPHP
¡¡¡¡PHP´ú±íÁË"³¬Îı¾´¦ÀíÆ÷"£¬ÕâÒâζ×ÅÄã±ØÐëÖªµÀ£¬ËüÊÇÒ»ÖÖ·þÎñÆ÷¶ËµÄ´¦ÀíÓïÑÔ£¬ÇÒÒÔHTMLµÄÐÎʽ³öÏÖ¡£Ëü×î³£Óõĵط½¾ÍÊÇÍøÒ³ÁË£¬Êý¾Ý´Ó¿Í»§»ú·¢Ë͵½Web·þÎñÆ÷£¬ÐÅÏ¢Ôڴ˱»´¦Àí²¢·µ»Ø½á¹û¡£
¡¡¡¡µ«ÕâÖÖͨÓÃÐÔµÄÓïÑÔË¿ºÁ²»¾ÖÏÞÓÚÔÚÍøÒ³·½Ã棬PHPÒ²Äܱ»ÓÃÔÚÃüÁîÐÐshellÖУ¬Ëü¿É×÷Ϊ²Ù×÷ϵͳµÄÒ»¸öÀ©Õ¹£¬ÓÉ´ËÖ´Ð ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ