2009新年快乐! 不指定

kevinliyong , 2008/12/31 16:12 , 絮絮叨叨 , 评论(0) , 阅读(219) , Via 本站原创

圣诞节啦~ 不指定

kevinliyong , 2008/12/25 13:16 , 絮絮叨叨 , 评论(0) , 阅读(228) , Via 本站原创


又是一年圣诞节!

在线制作的头像 不指定

kevinliyong , 2008/12/22 13:56 , 杂七杂八 , 评论(1) , 阅读(635) , Via 本站原创



在线制作的头像

http://lianpi.com/

htmlToText 函数 不指定

kevinliyong , 2008/12/16 14:52 , PHP , 评论(0) , 阅读(241) , Via 本站原创
function htmlToText($str) {
 $str = trim ( preg_replace ( '/<(.+?)>(.+?)<\/(.+?)>/', '\\2', $str ) );
 $str = str_replace(",", ",", $str);
 $str = str_replace(',', '/', $str);
 return $str;
Tags:

【SQL】插入 查询 一句搞定! 不指定

kevinliyong , 2008/12/15 10:07 , MYSQL , 评论(0) , 阅读(212) , Via 本站原创
insert into siteforupdate (`site_id`, `grade`, `snatch_time`) select id, grade, snatch_time FROM sites

replace into siteforupdate (`site_id`, `grade`, `snatch_time`) select id, grade, snatch_time FROM sites
Tags:

snoopy 类 不指定

kevinliyong , 2008/12/04 18:28 , PHP , 评论(0) , 阅读(185) , Via 本站原创

<?

require_once './Snoopy.class.php';
$snoopy = new Snoopy;
//您要提交的URL地址
$to_url = "http://test.com/test.php";
//表单上一些文本框参数
$submit_vars["username"] = $username;
$submit_vars["message"] = $message;
$submit_vars["ip"] = $ip;
$snoopy->submit($to_url, $submit_vars);

?>


服务器不支持 CURL 用这个也不错!

下载:snoopy 类

下载文件 (已下载 67 次)

CURL POST数据 不指定

kevinliyong , 2008/12/03 18:04 , PHP , 评论(0) , 阅读(178) , Via 本站原创

<?php

$ch = curl_init();
$params = trim('username='.$username.'&message='.urlencode($message).'&ip='.$ip);
//$params = trim( 'reply[0][username]='.$username1.'&reply[1][username]='.$username2.'&reply[2][username]='.$username3);
$to_url = "http://test.com/test.php";
curl_setopt($ch, CURLOPT_URL, $to_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, false);
$return = curl_exec($ch);
curl_close($ch);


?>

测试SQL执行时间 不指定

kevinliyong , 2008/12/01 15:32 , PHP , 评论(0) , 阅读(238) , Via 本站原创
<?php
set_time_limit(3600);
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();//开始计时, 放在程序头
/***********/
sql处理部分
/***********/
$time_end = getmicrotime();//结束计时, 放在尾部
$time = $time_end - $time_start;
echo "Did nothing in $time seconds";
?>

--------------------------------------------------------------

<?php
function microtime_float()
{
   list($usec, $sec) = explode(" ", microtime());
   return ((float)$usec + (float)$sec);
}
 
//开始时间:
$time_start = microtime_float();
 
//结束时间
$time_end = microtime_float();
$needtime = round($time_end - $time_start, 3) ;
?>
Tags:
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]