{"id":21052530,"url":"https://github.com/fwolf/fwolflib","last_synced_at":"2026-04-25T15:36:01.061Z","repository":{"id":137793814,"uuid":"268553","full_name":"fwolf/fwolflib","owner":"fwolf","description":"Depreciated, use https://github.com/fwolf/fwlib instead.","archived":false,"fork":false,"pushed_at":"2013-07-28T08:32:02.000Z","size":824,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T14:37:55.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fwolf.png","metadata":{"files":{"readme":"readme.rst","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-08-04T09:47:30.000Z","updated_at":"2015-11-21T16:50:19.000Z","dependencies_parsed_at":"2023-03-11T11:10:56.057Z","dependency_job_id":null,"html_url":"https://github.com/fwolf/fwolflib","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fwolf/fwolflib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwolf%2Ffwolflib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwolf%2Ffwolflib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwolf%2Ffwolflib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwolf%2Ffwolflib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwolf","download_url":"https://codeload.github.com/fwolf/fwolflib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwolf%2Ffwolflib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32267710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T16:01:10.539Z","updated_at":"2026-04-25T15:36:01.016Z","avatar_url":"https://github.com/fwolf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"..\t-*- mode: rst -*-\n..\t-*- coding: utf-8 -*-\n\n\n===========================================================================\nReadme for Fwolflib\n===========================================================================\n\n\n\nClass\n============================================================\n\n\n\najax/\n--------------------------------------------------\n\najax-sel-div.php::AjaxSelDiv\n\tSelect data using ajax div.\n\n\n\nbenchmark.php::Benchmark\n--------------------------------------------------\n\n\nBenchmark code running time cost by set marker in code.\n\n\n\ncache/\n--------------------------------------------------\n\n\ncache.php::Cache\n\tBase class for key - value like cache system.\n\ncache-file.php::CacheFile\n\tK-v cache class using file storage.\n\ncache-memcached.php::CacheMemcached\n\tK-v cache class using memcached storage.\n\n\n\ncache.php::Cache (Deprecated)\n--------------------------------------------------\n\n\nKey - value like cache system, data store in filesystem.\n\n\n\ncurl.php::Curl\n--------------------------------------------------\n\nA class aimed to use curl function efficiency.\nUseful for write webgame bot, or an information thief program.\n\n\n\ncurl-comm.php::CurlComm\n--------------------------------------------------\n\n\nCommucate with server via http using Curl.\n\n\n\ndbbak2sql.php::DbBak2Sql\n--------------------------------------------------\n\n\nBackup db to standard sql files.\n\n\n\ndbupdater.php:DbUpdater\n--------------------------------------------------\n\n\nDatabase mantance \u0026 update tools.\n\n\n\ndict.php::Dict\n--------------------------------------------------\n\n\nDict data management, mostly for db.\n\n\n\ndisp_listtable.php::DispListTable (Deprecated)\n--------------------------------------------------\n\n\n(Use ListTable instead)\n列表类，以包含表头、分页、数据表格的方式显示各种列表。\n\n\n\ndoc-markdown.php::DocMarkDown\n--------------------------------------------------\n\n\nEasy write/display doc using Markdown markup language.\n\n\n\nebay.php::Ebay\n--------------------------------------------------\n\n\neBay API caller class, only a few func done.\n\n\n\nexcel.php::Excel\n--------------------------------------------------\n\n\nGenerate excel file, xml mode, need high version of MS Excel.\n\n\n\nfwolflib.php::Fwolflib\n--------------------------------------------------\n\n\nBasic class of all. Log included.\n\n\n\nlist-table.php::ListTable\n--------------------------------------------------\n\n\nGeneral table style display html to list data.\n\n\n\nmail_parser.php::MailParser\n--------------------------------------------------\n\n\nParse a maildir format mail file, got info, especially attachments.\n\n\n\nmailsender.php::MailSender\n--------------------------------------------------\n\n\nEasy send mail using PHPMailer.\n\n\n\nrv/\n--------------------------------------------------\n\nrv.php::Rv\n\tReturn value class.\n\n\n\nsmarty-fl/\n--------------------------------------------------\n\nsmarty-fl.php::SmartyFl\n\tExtended Smarty class.\n\n\n\nsql_generator.php::SqlGenerator\n--------------------------------------------------\n\n\nTools class to generator compative sql parse, Adodb object needed.\n\n\n\ntodatauri.php::ToDataUri\n--------------------------------------------------\n\n\nCan save html all in 1 file.\n\n\n\nvalidator.php::Validator\n--------------------------------------------------\n\n\nValidate form data, include web frontend and php backend.\n\n\n\nCSS\n============================================================\n\n\n\nfilename.php is loader for php, return css file content.\n\n\n\ndefault.css\n--------------------------------------------------\n\n\nDefault normal css.\n\n\n\nreset.css\n--------------------------------------------------\n\n\nEric Meyer’s css reset.\n\n\n\nFunction\n============================================================\n\n\n\narray.php\n--------------------------------------------------\n\n\nArrayAdd (\u0026$ar_srce, $key, $val = 1)\n\tAdd value to array by key, if key not exist, init with value.\n\nArrayEval ($s_eval, $ar = array())\n\tEval string by replace tag with array value by index.\n\nArrayInsert (\u0026$ar_srce, $idx, \u0026$ar_ins, $i_pos = 1)\n\tInsert data to assigned position in srce array by assoc key.\n\nArrayRead ($ar, $key, $val_default = null)\n\tRead value from array.\n\nArraySort (\u0026$ar_srce, $key, $b_asc = true, $joker = '')\n\tSort array by one of its 2lv keys, and maintain assoc index.\n\nFilterWildcard ($ar_srce, $rules)\n\tFilter an array by wildcard rules.\n\n\n\nclient.php\n--------------------------------------------------\n\n\nClientIpFromHex ($hex)\n\tGet user ip from hex string.\n\nClientIpToHex ($ip)\n\tConvert user ip to hex string format.\n\nGetBrowserType ()\n\t检查客户端的浏览器是NS还是IE(old)\n\nGetClientIp ()\n\tGet ip of client.\n\n\n\nconfig.php\n--------------------------------------------------\n\n\nGetCfg and SetCfg function.\n\n\nGetCfg ($key)\n\tReturn value of config string $cfg.\n\nLimitServerId ($id)\n\tLimit program can only run on prefered server.\n\nSetCfg ($key, $val)\n\tSet global config with key $key to value $val.\n\nSetCfgDefault ($key, $val)\nSet default value of global config var $config\n\n\n\ncrypt.php\n--------------------------------------------------\n\n\nMCryptSmplIvDecrypt/MCryptSmplIvEncrypt (...)\n\tUse mcrypt to de/encrypt, using a simple way to generate IV.\n\n\n\ndatetime.php\n--------------------------------------------------\n\n\nDate and time func.\n\n\nSecToStr ($i_sec, $b_simple = true)\n\tConvert sec back to str describe.\n\nStrToSec ($str)\n\tConvert str to seconds it means.\n\nStrtotime1 ()\n\tRemove ':000' before original strtotime().\n\n\n\ndbwrite.php\n--------------------------------------------------\n\n\nDbWrite ($db, $tbl, $data, $pkey)\n\t向数据库中写入数据，根据指定的主键或联合主键自动判断是insert还是update。\n\n\n\ndownload.php\n--------------------------------------------------\n\n\nDownload contents as a file.\n\n\n\necl.php\n--------------------------------------------------\n\n\nSmart echo line, end with \\n or \u003cbr /\u003e according running mod\n\n\n\nenv.php\n--------------------------------------------------\n\n\nRuntime environment and server env variant.\n\n\nForceHttps ()\n\tForce page to be visit through https://.\n\nIsCli ()\n\tCheck if this program is running under cli mod, or is viewing in browser\n\nNixOs ()\n\t判断当前主机是否nix操作系统\n\n\n\nescape_color.php\n--------------------------------------------------\n\n\nCovert escape color to html code\n\n\n\nfilesystem.php\n--------------------------------------------------\n\n\n文件系统常用函数。\n\n\nBaseName1 ($filename)\n\tManual get basename instead of using pathinfo()\n\nDelFile ($file_or_dir)\n\tDelete a dir or file completedly\n\nDirName1 ($filename)\n\tManual get dirname instead of using pathinfo()\n\nDirSize ($path)\n\tCount size of a directory, recursive\n\nFileExt1 ($filename)\n\tManual get extension instead of using pathinfo()\n\nFileName1 ($filename)\n\tManual get filename instead of using pathinfo()\n\nFileSize1 ($file)\n\tCount size of a file\n\nGetFilenameToWrite ($s_file)\n\tGet/gen a filename to write as a new file.\n\nListDir ($dir)\n\tList files and file-information of a directory order by mtime asc.\n\n\n\nformatbytesize.php\n--------------------------------------------------\n\n\nConvert variant byte size to human readable format string.\n\n\n\nini.php\n--------------------------------------------------\n\n\nIniGet ($filepath, $section = '', $item = '')\n\tRead ini file, return array of part of the value.\n\tNotice to retrieve global value, set $section to ' ' instead of ''.\n\n\n\nrequest.php\n--------------------------------------------------\n\n\n与 GET 和 POST 参数及 http 请求有关的函数集。\n\n\nGetGet ($var, $default)\n\tGet varient from $_GET\n\nGetParam ($k = '', $v = '', $b_with_url = false)\n\tGet and return modified url param.\n\nGetPost ($var, $default)\n\tGet varient from $_POST\n\nGetSelfUrl ()\n\tGet self url which user visit, including GET parameters.\n\nGetUrlPlan ($url = '')\n\tGet http/https from an url or self.\n\n\n\nregex_match.php\n--------------------------------------------------\n\n\nRegexMatch($preg, $str = '', $csrts = true)\n\tMatch content using preg, return result array or '' if non-match.\n\n\n\nstring.php\n--------------------------------------------------\n\n\n常用字符串函数集。\n\n\nAddslashesRecursive ($srce)\n\tAddslashes for any data, recursive.\n\nJsonEncodeHex ($val)\n\tJson encode with JSON_HEX_(TAG|AMP|APOS|QUOT) options.\n\nJsonEncodeUnicode ($val, $option = 0)\n\tJson encode, simulate JSON_UNESCAPED_UNICODE option is on.\n\nMatchWildcard ($str, $rule)\n\tMatch a string with rule including wildcard.\n\nPin15To18 ($pin)\n\tConvert 15-digi pin to 18-digi.\n\nStrToArray ($s_srce, $s_splitter = ',', $b_trim = true, $b_remove_empty = true)\n\tConvert string to array by splitter.\n\nSubstrIgnHtml ($str, $len, $marker, $start = 0, $encoding = 'utf-8')\n\tGet substr by display width, and ignore html tag's length.\n\n\n\nurl.php\n--------------------------------------------------\n\n\n处理url字符串，增加或设置/更改URL参数。\n\n\n\nutf8_fix.php\n--------------------------------------------------\n\n\nConvert string like '_D0_D0_D0' to normal string\n\n\n\nuuid.php\n--------------------------------------------------\n\n\nUuid ($s_cus, $s_cus2)\n\tGenerate an UUID.\n\nUuidParse ($uuid)\n\tGet information from an UUID.\n\nUuidSpeedTest ($num, $file)\n\tTest how many uuid can this program generate per second.\n\n\n\nvalidate.php\n--------------------------------------------------\n\n\nValidateIp ($ip)\n\tIf an ip string given is valid address.\n\nValidateEmail ($email)\n\tValidate an email address.\n\n\n\nJavaScript\n============================================================\n\n\n\nalert.js\n--------------------------------------------------\n\n\nJsAlert (msg, title, s_id, b_show_close, b_show_bg)\n\tShow msg using js/jQuery, with a float div.\n\n\n\ncommon.js\n--------------------------------------------------\n\n\n通用 JS 函数集。\n\n\nGetScrollTop ()\n\tGet document scrollTop\n\nGetWindowHeight ()\n\tGet window height\n\nObjLen (obj)\n\tSimulate object length\n\nObjToStr (obj)\n\tConvert Object to json string, like Array\n\n\n\ncookie.js\n--------------------------------------------------\n\n\nCookie 操作 JS 函数集。\n\n\n\ndbdiff.js\n--------------------------------------------------\n\n\nDisplay diff info generate by class Module::DbDiff()\n\n\n\nprint-area.js\n--------------------------------------------------\n\n\nPrint area in html, exclude other part.\n\n\n\nvalidate.js\n--------------------------------------------------\n\n\n数据效验 JS 函数集。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwolf%2Ffwolflib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwolf%2Ffwolflib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwolf%2Ffwolflib/lists"}