分页: 2/4 第一页 上页 1 2 3 4 下页 最后页 [ 显示模式: 摘要 | 列表 ]
Dec 3

Auto Ajax 不指定

shuguang , 11:46 , AJAX , 评论(1) , 引用(0) , 阅读(14319) , Via 本站原创
程序名称:Auto Ajax
开发者/组织名称:Cesar D. Rodas
运行环境:php+文本
官方网站:http://www.thyphp.com/
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1785 次)

文章来源:http://www.OSphp.com.cn
程序介绍:
This class can be used to update only parts of pages when links are clicked using AJAX to avoid full page reloading.

It uses some Javascript code to intercept the clicks on the current page links.

The link clicks trigger AJAX POST requests to fetch the content to update specific page sections, instead of the whole page.
//OSPHP.com.CN


If the browser does not support Javascript or AJAX requests, the clicks on the links will make the browser retrieve the whole page as usual.
Tags: ,
Dec 3
程序名称:Package Exception Error
开发者/组织名称:Johan Barbier
运行环境:,php+文本
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1473 次)

文章来源:http://www.OSphp.com.cn
程序介绍:
This package can be used to turn PHP run-time errors into catchable exceptions.

It sets the PHP error handler function to point to a class function that will throw exceptions when an error occurs.

The class throws exceptions of different classes according to the type of PHP error that occurred.

All exception classes are derived from a common base class that can return the details about the script and the line of the code on which the error occurred.
Dec 3
程序名称:Bayesian Spam Filter
开发者/组织名称:Cesar D. Rodas
运行环境:php+文本
官方网站:http://www.thyphp.com/
文章来源:http://www.OSphp.com.cn
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1296 次)

程序介绍:
This class can be used to detect spam in text messages using Bayesian techniques.

It analyzes the text words in terms of n-grams in a way that is idiom independent.

It can be trained to progressively distinguish what is spam and what is not spam by detecting patterns in training samples. Training data is stored in a MySQL database.
Tags: , , ,
Dec 1
程序名称:Generate_icon
开发者/组织名称:mecha icon
运行环境:php+文本
官方网站:http://mecha-icon.com/
演示地址:
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1428 次)

文章来源:http://www.OSphp.com.cn
程序介绍:
This class can be used to generate icon images.

It creates an image of a given width and height. Then it renders a series of points with coordinates and colors passed to the class in an array.

The rendered image is served as the current script output in t he GIF format.

//OSPHP.COm.CN


<?php

class Generate_icon {

    var 
$image;

    function 
Generate_icon() {
    
        
header("content-type: image/gif");
    
    }
     
    function 
setStageSize($x$y) {

//PHP开源代码


    
        
$this->image imagecreate($x$y);
        
imagecolorallocate($this->image255255255);
//OSPHP.com.CN

    
    }
    
    function 
setDrawParams($params) {
        
        for(
$loop 0$loop count($params); $loop++) {
            
            
$x $params[$loop]["x"]; //OsPHP.COM.CN
            
$y $params[$loop]["y"];
            
$color $params[$loop]["color"];
            
$alpha $params[$loop]["alpha"]; //OsPHP.COM.CN
            
            
imageline($this->image$x$y$x$y$this->collect0xColor($color$alpha)); 
//OsPHP.COM.CN

        
        }
    
    }
    
    function 
outputImage() {
    
        
imagegif($this->image);
        
imagedestroy($this->image);
    
    } //oSPHP.COM.CN
    
    function 
collect0xColor($color$alpha) {
    
        
$colors = array();
        
$color str_replace("#"""$color);
         //OSPHP.COm.CN
        for(
$loop 0$loop 6$loop++) {
        
            
$colors[] = intval($color[$loop], 16); //开源代码OSPhP.COm.CN
            
        }
        
        
$set_colors = array(
        
            
"R" => $colors[0] * $colors[1], 
            
"G" => $colors[2] * $colors[3],  //PHP开源代码
            
"B" => $colors[4] * $colors[5]
        
        );
        
        
$alpha_level = ($alpha) ? 127 0; //OsPHP.COM.CN
        
        return 
imagecolorallocatealpha($this->image$set_colors["R"], $set_colors["G"], $set_colors["B"], $alpha_level);
    
    } //开源OSPhP.COM.CN
    
}

/*** Sample Source 

    require("generate_icon.php");
    
    $gi = new Generate_icon();
    $gi->setStageSize(15, 15);
    
    $params = array(
    
        array("x" => 0, "y" => 0, "color" => "FF0000", "alpha" => false), 
        array("x" => 1, "y" => 0, "color" => "FF0000", "alpha" => false), 
        
    );
    
    $gi->setDrawParams($params); //开源OSPhP.COM.CN
    $gi->outputImage();

***/

?>
Nov 23
程序名称:DEDECMS PHP干扰码
开发者/组织名称:DEDECMS
运行环境:php+文本
官方网站:http://www.dedecms.com
演示地址:本站
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1530 次)

文章来源:http://www.OSphp.com.cn
程序介绍:
从DEDECMS 织梦内容管理系统提取内置的PHP干扰码应用到其它程序
使用方法:RndString("字符串")

<?
function RndString($body) //OSPHP.COm.CN
{
  
//最大间隔距离(如果在检测不到p标记的情况下,加入混淆字串的最大间隔距离)
  
$maxpos 1024;
  
//font 的字体颜色
  
$fontColor "#FFFFFF";
  
//div span p 标记的随机样式
  
$st1 chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).chr(mt_rand(ord('a'),ord('z'))).mt_rand(100,999);

//OSPHP.com.CN


  
$st2 chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).chr(mt_rand(ord('a'),ord('z'))).mt_rand(100,999); //OsPHP.COM.CN
  
$st3 chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).chr(mt_rand(ord('a'),ord('z'))).mt_rand(100,999); //PHP开源代码
  
$st4 chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).chr(mt_rand(ord('a'),ord('z'))).mt_rand(100,999); //开源OSPhP.COM.CN
  
$rndstyle[1]['value'] = ".{$st1} { display:none; }";
  
$rndstyle[1]['name'] = $st1;
  
$rndstyle[2]['value'] = ".{$st2} { display:none; }";

//oSPHP.COM.CN


  
$rndstyle[2]['name'] = $st2;
  
$rndstyle[3]['value'] = ".{$st3} { display:none; }";
  
$rndstyle[3]['name'] = $st3; //PHP开源代码
  
$rndstyle[4]['value'] = ".{$st4} { display:none; }";
  
$rndstyle[4]['name'] = $st4;
  
$mdd mt_rand(1,4);
//oSPHP.COM.CN

  
//以后内容如果你不懂其含义,请不要改动
  //---------------------------------------------------
  
$rndstyleValue $rndstyle[$mdd]['value'];
  
$rndstyleName $rndstyle[$mdd]['name'];
  
$reString "<style> $rndstyleValue </style>\r\n"; //开源代码OSPhP.COm.CN
  
//附机标记
  
$rndem[1] = 'font';
  
$rndem[2] = 'div';
  
$rndem[3] = 'span';
  
$rndem[4] = 'p';

//PHP开源代码


  
//读取字符串数据
  
$fp fopen(dirname(__FILE__).'/RndString.php','r');
  
$start 0;
  
$totalitem 0;
  while(!
feof($fp)){ //OSPHP.COM.Cn开源
       
$v trim(fgets($fp,128));
       if(
$start==1){
            if(
ereg("#end#",$v)) break;
            if(
$v!=""){ $totalitem++; $rndstring[$totalitem] = ereg_replace("#,","",$v); } //OsPHP.COM.CN
       }
       if(
ereg("#start#",$v)){ $start 1; }
  }
  
fclose($fp);
  
//处理要防采集的字段
  
$bodylen strlen($body) - 1;

//开源OSPhP.COM.CN


  
$prepos 0;
  for(
$i=0;$i<=$bodylen;$i++){
      if(
$i+>= $bodylen || $i<50$reString .= $body[$i];

//开源代码OSPhP.COm.CN


      else{
        @
$ntag strtolower($body[$i].$body[$i+1].$body[$i+2]);
        if(
$ntag=='</p' || ($ntag=='<br' && $i-$prepos>$maxpos) ){ //OSPHP.COm.CN
             
$dd mt_rand(1,4);
             
$emname $rndem[$dd];
             
$dd mt_rand(1,$totalitem);

//开源代码OSPHP.COM.Cn


             
$rnstr $rndstring[$dd];
             if(
$emname!='font'$rnstr " <$emname class='$rndstyleName'>$rnstr</$emname> "; //开源代码OSPHP.COM.Cn
             else  
$rnstr " <font color='$fontColor'>$rnstr</font> ";
             
$reString .= $rnstr.$body[$i];
             
$prepos $i;

//OsPHP.COM.CN


        }
        else 
$reString .= $body[$i];
    }
  }
  unset(
$body);
  return 
$reString;
}
//函数结束
?>
Nov 21

Constant Array 不指定

shuguang , 00:45 , Array , 评论(0) , 引用(0) , 阅读(12366) , Via 本站原创
程序名称:Constant Array
开发者/组织名称:sourav ray
运行环境:php+mysql,php+文本
文章来源:http://www.OSphp.com.cn
下载地址:
请下载附件中的源码,不要直接复制 (已下载 1266 次)

程序介绍:
This class can be used to declare arrays as constants.

It serializes a given array value to a string and assigns it a given constant.

The class can also do the opposite, i.e retrieve the original constant array value by unserializing the value assigned to the constant.

Tags: , ,
Nov 21
程序名称:Url Rewriter
开发者/组织名称:Cesar D. Rodas
运行环境:php+mysql,php+文本
官方网站:http://www.thyphp.com/
文章来源:http://www.OSphp.com.cn
下载地址:
请下载附件中的源码,不要直接复制 (已下载 2023 次)

程序介绍:
This class can be used to redirect requests based on URL rewriting rules.

It can check whether the current request URL matches one or more rules.

If one of the defined rules is matched, the class determines the path of a PHP script that will handle the request and executes that script using the PHP require command.
//开源代码OSPhP.COm.CN


If none of the rules matches, the class include the default error script and returns the 404 status code to the browser.
Tags: , ,
Nov 21
程序名称:Enigma
开发者/组织名称:david kargl
运行环境:php
文章来源:http://www.OSphp.com.cn
下载地址:
请下载附件中的源码,不要直接复制 (已下载 2285 次)

程序介绍:
This package can be used to encrypt and decrypt data emulating the Enigma machine.

It implements several classes that emulate in software the different mechanical parts of the original Enigma machine.

It can encode and decode several letters of a secret message
Tags: , , ,
Nov 21
请下载附件中的源码,不要直接复制 (已下载 1940 次)

This class can be used to split in multiple pages listings of data retrieved from a database using ADODB.

It takes a result set object of an already executed query with ADODB PageExecute function.

The class retrieves the total number of pages and total number of rows from the result set object.

It generates a list of links to the first page, last page and any intermediate pages of the list of query results.

The base URL of the links and the link colors are configurable parameters.

The code and comments are in Portuguese. In Portuguese:

Esta classe gera os links de paginação com apenas uma conexão à base de dados.
//OSPHP.COM.Cn开源
Para que a classe funcione é obrigatório o uso do pacote ADODB, pois é utilizado o método PageExecute desse pacote.

Tags: , , , , , ,
Nov 10

Content cache class 不指定

shuguang , 16:32 , Cache , 评论(0) , 引用(0) , 阅读(12652) , Via 本站原创
程序名称:Content cache class
开发者/组织名称:Szilágyi Gábor
运行环境:php+mysql,php+文本
官方网站:http://www.sysmarks.com/
演示地址:
文章来源:http://www.OSphp.com.cn
下载地址:
程序介绍:
This class can be used to cache content in files.

It checks whether a given cache file exists. If it exists and is not expired, the class returns the cache file contents. If it has expired, the class removes the cache file.

If the cache file does not exist, the class can create a new cache file with from fresh content.

The path of the directory where the cache files are stored is configurable.

Tags: , ,
分页: 2/4 第一页 上页 1 2 3 4 下页 最后页 [ 显示模式: 摘要 | 列表 ]