php»ñÈ¡ÔͼƬ
<?php
/*
»ñÈ¡Ô¶³ÌͼƬº¯Êý
*/
function GrabImage($url,$filename=""){
//ÈôurlΪ¿Õ·µ»Øfalse£¬ÎÞµØÖ·
if($url=="") return false;
//Èô$filenameΪ¿Õ
if($filename=="") {
$ext=strrchr($url,"."); //»ñÈ¡"."¼Óºó׺
if($ext!=".gif"&&$ext!=".jpg"&&$ext!=".png") return false;
$filename=date("YmdHis").$ext;
}
ob_start();
readfile($url);
$img = ob_get_contents();
ob_end_clean();
$size = strlen($img);
$fp2=@fopen($filename,"a");
fwrite($fp2,$img);
fclose($fp2);
return $filename;
}
$img=GrabImage("http://www.google.com/intl/en_ALL/images/logo.gif","logo.gif");
if($img){
echo '<img src="'.$img.'" mce_src="'.$img.'">';
}else{
echo "false";
}
?>
Ïà¹ØÎĵµ£º
×î½üÓÐÈËÔÚÕбêÒª×ö¸öÏñ£ºwww.webjianzhi.com ÕâÑùµÄÈ˲ÅÕ¾£¬³õ¿´£¬Õâ¸öÍøÂç¼æÖ°Íø£¬½çÃ滹ÊDZȽÏÇåÎúµÄ¡£
ÕûÌå·ÖÎöÁËһϣ¬Ò»¸öÐÂÎÅÎÄÕ·¢²¼ÏµÍ³£¬Õâ¸ö²»ÊǺÜÄÑ£¬ÁíÒ»¸ö¾ÍÊÇ×ֶε÷ÓÃϵͳ£¬¾ÍÊÇÊ×Ò³µÄÖ°Òµ½éÉÜ£¬¼æÖ°ÈËÆø£¬µÄÕâЩµ÷Óá£
ÁíÒ»¸ö¾ÍÊÇ»áÔ±·¢²¼ÏµÍ³¡£
Õû¸öÓñí¸ñ²¼¾Ö£¬ÃÀ¹¤Éϲ»´æÔ ......
¿´µ½Í¬Ñ§ÃÇÓв»ÉÙÔÚÓÃphp¿ª·¢ÏîÄ¿µÄ£¬»òÐíÏÂÃæµÄ×ÊÁ϶Դó¼ÒÓÐÓðɣ¬ÓÃÀ´Ñ§Ï°Ò»ÏÂÒ²ºÃ¡£
ÊÕ¼¯µÄ×ÊÁÏÏà¹ØµØÖ·£º
cubi demo site£ºhttp://dev.openbiz.cn/cubi/user/login
openBiz app cubi£ºhttp://docs.google.com/View?id=df5ktjv9_64f9fd88gf
openbiz architecture overview:
http: ......
PHPÔÚÔËÐеÄʱºò£¬Ö±½Ókillµô£¬ÓпÏÄÜÔì³ÉÊý¾ÝµÄ¶ªÊ§¡£ÐÒºÃphpÄ£¿é£¬ÓÐÕë¶ÔsignalµÄ´¦Àí¡£
´¦Àí·½Ê½£¬Ê×Ïȼì²éÓÐûÓа²×° PCNTL Ä£¿é
È»ºó¿ÉÒÔÔÚÒ»¸ö°üº¬ÎļþÖУ¬Ìí¼ÓÒÔÏ´úÂë
global $exitFlag;
$exitFlag = false;
// Ôö¼ÓlinuxÐźÅÁ¿´¦Àí
if (DIRECTORY_SEPARATOR != '\\') {
pcntl_signal(SI ......
PHPÓïÑÔ±¾ÉíÊDz»Ö§³Ö¶àÏ̵߳Ä. ×ܽáÁËÒ»ÏÂÍøÉϹØÓÚPHPÄ£Äâ¶àÏ̵߳ķ½·¨, ×ܵÄÀ´Ëµ, ¶¼ÊÇÀûÓÃÁËPHPµÄºÃ»ï°éÃDZ¾ÉíËù¾ßÓеĶàÏß³ÌÄÜÁ¦.
PHPµÄºÃ»ï°éÖ¸µÄ¾ÍÊÇLINUXºÍAPACHEÀ², LAMPÂï.
ÁíÍâ, ¼ÈÈ»ÊÇÄ£ÄâµÄ, ¾Í²»ÊÇÕæÕýµÄ¶àÏß³Ì. ÆäʵֻÊǶà½ø³Ì. ½ø³ÌºÍÏß³ÌÊÇÁ½¸ö²»Í¬µÄ¸ÅÄî. ºÃÁË, ÒÔÏ·½·¨¶¼ÊÇ´ÓÍøÉÏÕÒÀ´µÄ.
1. ÀûÓÃLIN ......
1. PHP¿ÉÔĶÁËæ»ú×Ö·û´®
´Ë´úÂë
½«´´½¨Ò»¸ö¿ÉÔĶÁµÄ×Ö·û´®£¬Ê¹Æä¸ü½Ó½ü´ÊµäÖеĵ¥
´Ê£¬ÊµÓÃÇÒ¾ßÓÐÃÜÂëÑéÖ¤¹¦ÄÜ¡£
/**************
[email=*@length]*@length[/email] - length of random string (must be a
multiple of 2)
**************/
function readable_random_string($length = 6){
$conso= ......