Home > Download >  Library download

  • <?php class Xcrypt{     private $mcrypt;     private $key;     private $mode;     private $iv;     private $blocksize;     public function __construct($key, $mode = 'cbc', $iv = "off"){         switch (strlen($key)){             case 8:                 $this->mcrypt = MCRYPT_DES;                 break;             case 16:                 $this->mcrypt = MCRYPT_RIJNDAEL_128;                 break;             case 32:                 $this->mcrypt = MCRYPT_RIJNDAEL_256;                 break;             default:                 die("Key size must be 8/16/32");         }Commonly used symmetric encryption algorithm classSupported key: 64/128/256 bit (byte length 8/16/32)Supported algorithm: DES/AES (according to the key Key length automatic matching uses: DES: 64bit AES: 128/256bit) Supported mode: CBC/ECB/OFB/CFBCiphertext encoding: base64 string/hexadecimal character String/binary string streamPadding method: PKCS5Padding (DES)

    Other libraries29832018-01-19
  • <?php class class_post {     function fun_text1($num1,$num2,$str)     {         Return (preg_match("/^[a-zA-Z0-9]{".$num1.",".$num2."}$/",$str))?true:false;     }     function fun_text2($num1,$num2,$str)     {         return (preg_match("/^[0-9]{".$num1.",".$num2."}$/i",$str))?true:false;     }     function fun_font($num1,$num2,$str)     {         return (preg_match("/^([\x81-\xfe][\x40-\xfe]){".$num1.",".$num2."}$/",$str))?true:false;     }     function fun_status($str)     {         return (preg_match('/(^([\d]{15}|[\d]{18}|[\d]{17}x)$)/',$str))?true:false;     }     function fun_email($str){         return (preg_match('/^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$/',$str))?true:false;     } Page function: common form verification class, verify whether it is a letter/number combination of a specified length, whether it is a number of a specified length, whether it is a Chinese character of a specified length, verify ID number, verify email address, verify phone number

    Other libraries33802018-01-19
  • <?php include "../libchart/classes/libchart.php"; $chart = new HorizontalBarChart(600, 170); $dataSet = new XYDataSet(); $dataSet->addPoint(new Point("/wiki/Instant_messenger", 50)); $dataSet->addPoint(new Point("/wiki/Web_Browser", 75)); $dataSet->addPoint(new Point("/wiki/World_Wide_Web", 122)); $chart->setDataSet($dataSet); $chart->getPlot()->setGraphPadding(new Padding(5, 30, 20, 140)); $chart->setTitle("Most visited pages for www.example.com"); $chart->render("generated/demo2.png");//Special function to draw a 3-dimensional pie chart//$data, pie chart structure data//$data data parameters//$ XPos, X coordinate of the center of the circle //$YPos, Y coordinate of the center of the circle //$Radius=100, radius//$DrawLabels=PIE_NOLABEL, label style (Percentage and label)//$EnhanceColors=false, border rendering//$Skew=50, tilt angle//$SpliceHeight=20, pie Thickness//$SpliceDistance=5, distance between each plate//$Decimals=2 Display percentage decimal places

    Other libraries24892018-01-18
  • <?php   include("pChart/pData.class");  include("pChart/pChart.class");  $DataSet = new pData;  $DataSet->AddPoint(array(1,4,-3,2,-3,3,2,1,0,7,4,-3,2,-3,3,5,1,0,7),"Serie1");  $DataSet->AddPoint(array(0,3,-4,1,-2,2,1,0,-1,6,3,-4,1,-4,2,4,0,-1,6),"Serie2");  $DataSet->AddAllSeries();  $DataSet->SetAbsciseLabelSerie();  $DataSet->SetSerieName("January","Serie1");  $DataSet->SetSerieName("February","Serie2");  $Test = new pChart(700,230);  $Test->setFontProperties("Fonts/tahoma.ttf",8);  $Test->setGraphArea(50,30,585,200);  $Test->drawFilledRoundedRectangle(7,7,693,223,5,240,240,240);  $Test->drawRoundedRectangle(5,5,695,225,5,230,230,230);  $Test->drawGraphArea(255,255,255,TRUE);  $Test->draw$graph->title->Set(iconv_arr("Phpwind Chart Test")); //Set the chart title here iconv_arr is added by myself. In order to support our great Chinese, you need to set your current encoding Convert to html entity$graph->xaxis->title->Set(iconv_arr("This is probably the month")); //Set the X-axis title$ graph->yaxis->title->Set(iconv_arr("This is the Y-axis")); //Set the Y-axis title$graph->title->SetFont(FF_SIMSUN, FS_BOLD); //Set the title font. The default font here is FF_FONT1. For Chinese, change it to FF_SIMSUN$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //Set X Axis title font$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //Set Y-axis title font

    Other libraries26032018-01-18
  • <?php class SimplePie_Autoloader { public function __construct() { $this->path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'library'; } public function autoload($class) { // Only load the class if it starts with "SimplePie" if (strpos($class, 'SimplePie') !== 0) { return; } $filename = $this->path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; include $filename; } }rss simple information aggregation (also called aggregation content) is an RSS content packaging and delivery protocol based on XML standards that is widely used on the Internet. RSS (Really Simple Syndication) is a format for describing and synchronizing website content, and is the most widely used XML application. RSS has built a technical platform for rapid information dissemination, making everyone a potential information provider. After publishing an RSS file, the information contained in the RSS feed can be directly called by other sites, and because the data is in standard XML format, it can also be used in other terminals and services. It is a kind of description and synchronization. The format of website content. [1] RSS can be one of the following three interpretations: Really Simple Syndication; RDF (Resource Description Framework) Site Summary; Rich Site Summary. But in fact, these three explanations all refer to the same Syndication technology.

    Other libraries25092018-01-18
  • <?php if (!file_exists('phpThumb.config.php')) { if (file_exists('phpThumb.config.php.default')) { echo 'WARNING! "phpThumb.config.php.default" MUST be renamed to "phpThumb.config.php"'; } else { echo 'WARNING! "phpThumb.config.php" should exist but does not'; } exit; } header('Location: ./demo/'); It is an open source image thumbnail class library that can complete a variety of complex image thumbnail generation and reality, and is very convenient to use.

    Other libraries32622018-01-18
  • I was working on a WeChat applet recently and found that no one had done a ThinkPHP extension for WeChat applet signature decryption, so I developed one while doing it Extract the compressed package to the extend directory, and you can call it directly in the controller <?php /** * Created by PhpStorm. * User: yang jianmin * Date: 2017/7/1 * Time: 17:33 */ namespace app\index\controller; use think\Controller; use sample\WXBizDataCrypt; use app\index\model\User as UserModel; class Test extends Controller { public function index() { $appid = ''; $sessionKey = ''; $encryptedData=""; $iv = ''; $pc = new WXBizDataCrypt($appid, $sessionKey); print_r($pc); $errCode = $pc->decryptData($encryptedData, $iv, $data ); if ($errCode == 0) { print_r($data ); } else { return $errCode ; } }

    Other libraries106612018-01-17
  • <?php namespace com; class Sms{ //默认配置 protected $appcode; protected $host="http://sms.market.alicloudapi.com"; protected $path = "/singleSendSms"; public function __construct() { $this->appcode = config('sms_appcode');//读取配置的appcode } public function send($phoneNo,$verify_code){ $host = $this->host; $path = $this->path; $method = "GET"; $appcode = $this->appcode; $headers = array(); array_push($headers, "Authorization:APPCODE " . $appcode); $phone = $phoneNo; //目标手机号,多条记录可以英文逗号分隔 $paramstring = '{"verify_code":"'.$verify_code.'"}';//这是验证码,根据自己的短信模板来设置 $paramstring = urlencode($paramstring); $querys = "ParamString={$paramstring}&RecNum={$phone}&SignName=XXXX&TemplateCode=SMS_67123456"; //SignName 签名信息 TemplateCode 模板code 购买阿里云的短信服务这些都在控制台得到 $bodys = "";The recent project uses the Alibaba Cloud SMS service. I wrote a class based on the PHP example in the SMS service in the Alibaba Cloud market. Send SMS verification code.

    Other libraries35052018-01-17
  • <?php /**  * 支付宝支付  */ return [         //应用ID,您的APPID。         'app_id' => "",         //商户私钥, 请把生成的私钥文件中字符串拷贝在此         'merchant_private_key' => "",         //异步通知地址         'notify_url' => "",         //同步跳转         'return_url' => "",         //编码格式         'charset' => "UTF-8",         //签名方式         'sign_type'=>"RSA2",         //支付宝网关         'gatewayUrl' => "https://openapi.alipay.com/gateway.do",         //支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。         'alipay_public_key' => "", ];ThinkPHP5 Alipay payment extension library, including mobile website payment, computer website payment, payment inquiry, refund, refund inquiry, statement, etc. UsageComputer website payment Pagepay.phpCall \alipay\Pagepay::pay($params) to Mobile website payment Wappay. phpCall \alipay\Wappay::pay($params)Transaction query interface Query.phpCall\alipay\Query::exec($query_no ) to Transaction refund interface Refund.phpCall \alipay\Refund::exec($params) to Refund unified order query RefundQuery.php Call \alipay\RefundQuery::exec($params) Transaction close interface Close.phpCall \alipay\Close::exec($query_no) You canQuery the bill download address interface Datadownload.phpCall \alipay\Datadownload::exec($bill_type, $bill_date)Verify Notify.php Call \alipay\Notify::checkSign($params)

    Other libraries62572018-01-17
  • <?php class qqlogin{   public $app_id;   public $app_key;   public $callback;   public $code;   public $state;   public function __construct($app_id,$app_key,$callback){     $this->code = isset($_REQUEST['code'])? $_REQUEST['code'] : '';     $this->state = isset($_REQUEST['state'])? $_REQUEST['state'] : '';     $this->app_id = $app_id;     $this->app_key = $app_key;     $this->callback = $callback;   }1. First call the login method and send a request to Tencent. 2. Tencent carries the unique corresponding parameters OPENID and ACCESSTOKEN of this website and returns to the corresponding callback page. 3. The callback page accepts Tencent’s parameters. Finally, through these two parameters, the corresponding request is issued, such as querying the user's data. 4. Tencent performs corresponding operations, such as returning this user’s data to you

    Other libraries42752018-01-16
  • <?php class Segmentation {   var $options = array('lowercase' => TRUE,     'segment_english' => FALSE);   var $dict_name = 'Unknown';   var $dict_words = array();   function setLowercase($value) {     if ($value) {       $this->options['lowercase'] = TRUE;     } else {       $this->options['lowercase'] = FALSE;     }     return TRUE;   }   function setSegmentEnglish($value) {     if ($value) {       $this->options['segment_english'] = TRUE;     } else {       $this->options['segment_english'] = FALSE;     }     return TRUE;   }Chinese Word Segmentation refers to dividing a sequence of Chinese characters into individual words. Word segmentation is the process of recombining continuous word sequences into word sequences according to certain specifications. We know that in English writing, spaces are used as natural delimiters between words, while in Chinese, words, sentences and paragraphs can be simply delimited by obvious delimiters, but words do not have a formal delimiter. , although English also has the problem of dividing phrases, but at the word level, Chinese is much more complex and difficult than English.

    Other libraries49062018-01-16
  • <?php require_once("Classes/PHPExcel.php"); $phpexcel = new PHPExcel(); $phpexcel = PHPExcel_IOFactory::createReader("Excel5")->load("template.xls"); $phpexcel->getProperties()->setCreator("Liu Jian") // 文档作者 ->setLastModifiedBy("Liu Jian") // 最后一次修改者 ->setTitle("Office 2003 XLS Test Document") // 标题 ->setSubject("Office 2003 XLS Test Document") // 主题 ->setDescription("Test document for Office 2003 XLS, generated using PHPExcel.") // 备注 ->setKeywords("office 2003 openxml php") // 关键字 ->setCategory("Test result file"); // 类别 $phpexcel->createSheet(1); $sheet = $phpexcel->getSheet(1);Usually there are two ways to instantiate PHPExcel objects 1. Create a blank document through the new keyword2. Create it by reading an existing templateThe PHPExcel object after instantiation is similar to a document file temporarily stored in memory. You can operate on it to modify the document data and set the document properties. By default, the newly created blank document (via new) There is only one worksheet (sheet), and its index (index) is 0

    Other libraries42922018-01-16