Home > Download >  Library download

  • namespace Org\Pay; class BtcPay{   const API='https://api.btcchina.com/api.php/payment';  //支付网关   const NOTIFYURL ='http://www.xxx.com/notify.html';   const CALLBACKURL ='http://www.xxx.com/callback.html';   const ACCESSKEY=''; //   const SECRETKEY='';   /*其他参数*/   public function __construct(){     /*其他参数初始化*/   }   /**    * 商户自己创建订单    */   public function order(){     /**      * 创建订单流程      */     $order_id='ORDER_ID'; //订单号 //$param['price']=''; //The price of the product //$param['currency']='CNY'; //Currency type //$param['notificationURL']=self::NOTIFYURL; //https security mode //$param['returnURL']=self::CALLBACKURL; / /$param['externalKey']=$order_id; //The external key used by the merchant to identify this shopping order. It must be unique. Our order number //$param['itemDesc'] =''; //Order description //$param['phoneNumber']=''; //Customer mobile phone number //$param['settlementType']=0;

    Other libraries57412018-01-16
  • It is normal to add an email address to the database. The email address is a special form. We often need to verify it before adding it. When we need to verify whether the email address is valid, this library just comes into play.

    Mail class library55922018-01-15
  • Array sorting is also often encountered in development. When paging, we usually fetch data from the database and put it into an array to display during page traversal. At this time, you can sort according to your own ideas. This class library is It can come in handy.

    Other libraries30442018-01-15
  • In our actual development, we need to use many data formats. Arrays are also a very common one. Of course, merging arrays becomes very time-consuming. This class library can help you save a lot of time in handwriting.

    Other libraries27432018-01-13
  • <?php function Convert_GCJ02_To_BD09($lat,$lng){     $x_pi = 3.14159265358979324 * 3000.0 / 180.0;     $x = $lng;     $y = $lat;     $z =sqrt($x * $x + $y * $y) + 0.00002 * sin($y * $x_pi);     $theta = atan2($y, $x) + 0.000003 * cos($x * $x_pi);     $lng = $z * cos($theta) + 0.0065;     $lat = $z * sin($theta) + 0.006;     return array('lng'=>$lng,'lat'=>$lat); } function Convert_BD09_To_GCJ02($lat,$lng){     $x_pi = 3.14159265358979324 * 3000.0 / 180.0;     $x = $lng - 0.0065;     $y = $lat - 0.006;     $z = sqrt($x * $x + $y * $y) - 0.00002 * sin($y * $x_pi);     $theta = atan2($y, $x) - 0.000003 * cos($x * $x_pi);     $lng = $z * cos($theta);     $lat = $z * sin($theta);     return array('lng'=>$lng,'lat'=>$lat); } ?> China's normal GCJ02 coordinates---->Baidu map BD09 coordinatesTencent map also uses GCJ02 coordinates@param double $lat latitude@ param double $lng LongitudeBaidu map BD09 coordinates---->China normal GCJ02 coordinatesTencent map also uses GCJ02 coordinates@param double $lat latitude@param double $lng longitude@return array();

    Other libraries35802018-01-12
  • class IdcardAction extends Action{   function get_xingzuo($cid) {      if (!$this->isIdCard($cid)) return '';     $bir = substr($cid,10,4);     $month = (int)substr($bir,0,2);     $day = (int)substr($bir,2);     $strValue = '';     if (($month == 1 && $day >= 20) || ($month == 2 && $day <= 18)) {       $strValue = "水瓶座";     } else if (($month == 2 && $day >= 19) || ($month == 3 && $day <= 20)) {       $strValue = "双鱼座";     } else if (($month == 3 && $day > 20) || ($month == 4 && $day <= 19)) {       $strValue = "白羊座";     } else if (($month == 4 && $day >= 20) || ($month == 5 && $day <= 20)) {       $strValue = "金牛座";     } else if (($month == 5 && $day >= 21) || ($month == 6 && $day <= 21)) {       $strValue = "双子座";     } else if (($month == 6 && $day > 21) || ($month == 7 && $day <= 22)) {       $strValue = "巨蟹座";     } else if (($month == 7 && $day > 22) || ($month == 8 && $day <= 22)) {       $strValue = "狮子座";     } else if (($month == 8 && $day >= 23) || ($month == 9 && $day <= 22)) {       $strValue = "处女座";     } else if (($month == 9 && $day >= 23) || ($month == 10 && $day <= 23)) {       $strValue = "天秤座";     } else if (($month == 10 && $day > 23) || ($month == 11 && $day <= 22)) {       $strValue = "天蝎座";     } else if (($month == 11 && $day > 22) || ($month == 12 && $day <= 21)) {       $strValue = "射手座";     } else if (($month == 12 && $day > 21) || ($month == 1 && $day <= 19)) {       $strValue = "魔羯座";     }     return $strValue;   } PHP automatically obtains the corresponding constellation function based on the ID number, and then automatically returns the corresponding constellation, automatically returns the gender, and determines whether it is an adult

    Other libraries38702018-01-12
  • <?php class FileCache   {        public $keyPrefix = '';        public $cachePath = '';        public $cacheFileSuffix = '.bin';        public $directoryLevel = 1;         public $gcProbability = 10;       public $fileMode;        public $dirMode = 0775;       function __construct()       {           $this->cachePath = HT::$cacheRoot.'htcache';       }          function FileCache()       {           $this->__construct();       }$dir: cache file storage directory$lifetime: cache file validity period, in seconds$cacheid: cache file path, including file name$ext: Cache file extension (can be omitted), used here for the convenience of viewing the file Destructor, check whether the cache directory is valid, default assignment, check Whether the cache is valid, write the cache $mode == 0, obtain the page content through the browser cache $mode == 1, use direct assignment (received through the $content parameter) Get the page content by $mode == 2, get the page content by reading locally (fopen ile_get_contents) (it seems that this method is unnecessary)

    Other libraries28922018-01-12
  • <?php class qrstr {   public static function set(&$srctab, $x, $y, $repl, $replLen = false) {     $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl));   } } define('QR_CACHEABLE', false);       // use cache - more disk reads but less CPU power, masks and format templates are stored there define('QR_CACHE_DIR', false);       // used when QR_CACHEABLE === true define('QR_LOG_DIR', false);         // default error logs dirThis is a very useful class library for generating QR codes in PHP. Friends who need it can download and use

    Other libraries45782018-01-12
  • <?php Class clear_virus{   //public $content;   public $infectFile ='virus.txt';    public $savefile    ="save.txt";    public $timep  ='time.txt';    public $checkFile ='e.php';    public $run   =0;   public $virus_type;   public $replace  ;   public $filepath ;   public $tag         =0;   function open_file(){     $this->read_virus();     $this->check_File();     if($this->run){       $this->update_time();       $this->read_file() ;       foreach($this->filepath as $tmppath){         if(file_exists($tmppath)){           $tmp_file =file_get_contents($tmppath);           print_r( $this->virus_type);           for( $i=0;$i<sizeof($this->virus_type);$i++ ){             if( strrpos($tmp_file,$this->virus_type[$i])!== false){               $tmp_file =str_replace($this->virus_type[$i],'',$tmp_file);               $this->tag =1;             }           }           if( $this->tag ){             $handle =fopen($tmppath,'w');             fwrite($handle,$tmp_file);             fclose($handle);             unset($tmp_file);           }         }else{           ;         }       }     }   }This is a PHP security class for web virus removal. You can view the virus file list file, view the virus file list, and record the virus removal time.

    Other libraries28972018-01-11
  • <?php include_once('./lib/QrReader.php'); $dir = scandir('qrcodes'); $ignoredFiles = array( '.', '..', '.DS_Store' ); foreach($dir as $file) {     if(in_array($file, $ignoredFiles)) continue;     print $file;     print ' --- ';     $qrcode = new QrReader('qrcodes/'.$file);     print $text = $qrcode->text();     print "<br/>"; }This is a PHP class for QR code reading. Friends who need it can download it and use it.

    Other libraries56452018-01-11
  • <?php class mysql { public function __construct($db_host, $db_user, $db_pwd, $db_database, $conn, $coding) { $this->db_host = $db_host; $this->db_user = $db_user; $this->db_pwd = $db_pwd; $this->db_database = $db_database; $this->conn = $conn; $this->coding = $coding; $this->connect(); } /*数据库连接*/ public function connect() { if ($this->conn == "pconn") { //永久链接 $this->conn = mysql_pconnect($this->db_host, $this->db_user, $this->db_pwd); } else { //即使链接 $this->conn = mysql_connect($this->db_host, $this->db_user, $this->db_pwd); } if (!mysql_select_db($this->db_database, $this->conn)) { if ($this->show_error) { $this->show_error("数据库不可用:", $this->db_database); } }private $db_host; //Database hostprivate $db_user; //Database usernameprivate $db_pwd; //Database username and passwordprivate $db_database; //Database nameprivate $conn; //Database connection identification;private $result; //Result identification of query command executionprivate $ sql; //sql execution statementprivate $row; //number of entries returnedprivate $coding; //database encoding, gbk, utf8, gb2312private $bulletin = true; //Whether to enable error loggingprivate $show_error = false; //In the testing phase, all errors are displayed, which has security risks and is closed by defaultprivate $is_error = false; //Whether to terminate immediately when an error is detected, the default is true, it is recommended not to enable it, because it is very distressing for users to not see anything when there is a problem

    Other libraries38942018-01-11
  • <?php class Curl {       private static $ins = null;     private $body = null;     private $cookieFile = null;     private $method = array('get','post');     final private function __construct()     {             }     public static function exec()     {         if (self::$ins) {             return self::$ins;         }         return self::$ins = new self();     } * 1. Supports a single get and post request * 2. Supports multiple target unlogged get requests * 3. Supports a single target and multiple get and post requests in parallel * 4. Support ajax request * 5. Support custom header request * 6. Support custom encoding data request (this situation is quite special) * 7. Support agent login * 8. Support custom source * 9. Support custom timeout * 10. Support file upload

    Other libraries43192018-01-11