crVCL PHP Framework Version 2.9
Classes summary
_html_Doc | |
array2domxml | |
array2xml | |
cap_str | create a catcha picture (Completely Automated Public Turing to tell Computers from Humans Apart) |
chart | |
chartline | |
config_crvcl_inc | |
Contoller | super class for ControllerMain / ControllerPage |
ContollerMain | super class for the representation of the viewer |
ContollerPage | super class for each application page (controller), the method initComponents will be called automatic by the viewer if it exists, the method show will be called if no other method is passed and the method "show" exists in the controller |
Controller | super class for ControllerMain / ControllerPage |
ControllerMain | super class for the representation of the viewer |
ControllerPage | super class for each application page (controller), the method initComponents will be called automatic by the viewer if it exists, the method show will be called if no other method is passed and the method "show" exists in the controller |
CouchDB | $cdb = new CouchDB(); $cdb->m_trace_critical_section_id = "couchdb.trc.crit"; $cdb->m_trace_critical_section_path = $GLOBALS["DOCROOT"]."/temp"; $cdb->m_trace_path = $GLOBALS["DOCROOT"]."/logs"; $cdb->m_trace_delAfter = "10M"; $cdb->connect('cdb1', '192.168.2.16','root','xyz123'); print $cdb->getError('cdb1'); print_d($cdb->getInfo('cdb1')); |
crAsync | simple call functions/methods asynchronous |
crDateTime | |
CriticalSection | to handle critical sections / mutex similar like C++ |
crJWT | Sample: $secret = 'xx'; $payload = array('email'=>'[email protected]'); echo $jwt = crJWT::encode($payload, $secret); pp(crJWT::decode($jwt, $secret)); |
crVCLSessionHandler | |
daemon | PHP CLI daemon class, require the PCNTL librarie and the POSIX librarie |
dictBase | Dictionary Server Protocol (DICT) - RFC 2229, for more see http://www.dict.org By obtaining, using and/or copying data of any DICT database, you agree that you have read, understood, and will comply with the terms and conditions of this database. To get the information of a database use the method "show" recommended server "dict.uni-leipzig.de" |
domxml2array | |
DTA | basic class for DAT files |
DTAUS | DTAUS class provides functions to create DTAUS files used in Germany to exchange informations about money transactions with banks or online banking programs to test the DTAUS file see: https://www.xpecto.de/dtauschecker/ |
DTAZV | DTAZV class provides functions to create DTAZV files used in Germany to exchange informations about money transactions with banks or online banking programs |
ErrorHandler | |
ExceptionHandler | use this class only for custom exception logging |
ffmpegbin | |
fsock | |
GeoIPLib | based on the MaxMind LLC GeoIP implementation Sample: $geo = new GeoIPLib; var_dump($geo->geoip_country_code_by_addr("117.41.184.199")); var_dump($geo->geoip_country_code_by_addr("82.135.33.108")); var_dump($geo->geoip_country_code_by_addr("87.193.231.170")); |
GoogleAnalyticsParser | made for Google Analytics with ga.js, but work also with Universal GA via a native implementation (require session) - then the class must be init on every page to track the statistics |
htaccess | create htaccess files to protect a folder |
html5_Video | basic class for all html components |
html_Anchor | basic class for all html components |
html_Button | basic class for all html components with standart events |
html_Calendar | basic class for all html components with standart events |
html_Checkbox | basic class for all html components with standart events |
html_ChkListbox | basic class for all html components with standart events |
html_Choosebox | basic class for all html components with standart events |
html_CKEditor | require use of "html_Doc" and a custom ckeditor build with "Stylesheet Parser Plugin" and the following patches http://dev.ckeditor.com/ticket/9922. For general help see http://docs.ckeditor.com |
html_Colorbox | POSTBACK Vars: [COLORBOXNAME]_colorbox_value |
html_Combobox | basic class for all html components with standart events |
html_Component | basic class for all html components |
html_ComponentAMP | basic class for all amp html components |
html_Datepicker | basic class for all html components |
html_DivTable | basic class for all html components with standart events |
html_Doc | |
html_DocAMP | Accelerated Mobile Page |
html_Edit | basic class for all html components with standart events |
html_Events | basic class for all html components with standart events |
html_FlvBox | video player for FLV file, see also http://flv-player.net |
html_FocusEvents | basic class for all html components with standart events |
html_FocusEventsEx | basic class for all html components with standart events |
html_FoldingBox | basic class for all html components with standart events |
html_Form | basic class for all html components with standart events |
html_GroupBox | basic class for all html components |
html_iFrame | basic class for all html components |
html_Img | basic class for all html components with standart events |
html_ImgAMP | basic class for all amp html components |
html_InfoBox | basic class for all html components with standart events |
html_Label | basic class for all html components with standart events |
html_LinkLabel | basic class for all html components with standart events |
html_List | basic class for all html components |
html_Listbox | basic class for all html components with standart events |
html_Marquee | basic class for all html components with standart events |
html_Marquee2 | use in iframe, to not get scrollbar effects |
html_Memo | basic class for all html components with standart events |
html_Msgbox | basic class for all html components |
html_OpenDialog | basic class for all html components with standart events |
html_Optionbox | basic class for all html components with standart events |
html_Panel | basic class for all html components with standart events |
html_Radiobutton | basic class for all html components with standart events |
html_Resultbar | basic class for all html components |
html_RichText | html_RichText need DOM 2 (Document Object Model) |
html_Slider | basic class for all html components with standart events |
html_Spinbutton | basic class for all html components with standart events |
html_TabbedPane | html_TabbedPane is usable in 2 ways, you can check the selected index from PHP as sample with $_REQUEST['TabbedPane_index'] or from javascript with getObj('TabbedPane_index').value |
html_TabControl | use iframe for tab page control |
html_Table | POSTBACK Vars: [TABLENAME]sort_col [TABLENAME]_sort_type [TABLENAME]_highlight_row [TABLENAME]_cellcolor[CELL]_[ROW] |
html_tagCloud | basic class for all html components |
html_TinyMCE | require use of "html_Doc" for help see http://tinymce.moxiecode.com/wiki.php/Reference or external/tinymce/examples if you like to manipulate TinyMCE via javascript see the methods with prefix "js_" or see http://tinymce.moxiecode.com/wiki.php/API3:tinymce.api.3.x ATTENTION php_value short_open_tag 0 is required for TinyMCE version > 3.3 |
html_Window | basic class for all html components |
http | Samples: |
httprequest | |
imap | |
imap_attachment | |
imap_body | |
imap_header | |
imap_msg | |
imgbar | create a bar as image |
Int64 | Simulates 64 bit Integer |
JBridge | |
Logger | |
class to send mailīs as text/html with attachment's support mail() from php and standard smtp with auth. |
|
multiAjaxHtmlResponse | |
mvc_module_loader | to load a ControllerPage as module of the viewer, if your pages are not in the webserver root directory like: /var/www/mywebsite => main path of your website / path where the viewer is located /war/www/mywebsite/pages => path where the pages are located this is necessary for a search engine friendly web applications so you can call each page in the following both way www.yourdomain.com/?mvc_page=xx.php or www.yourdomain.com/pages/xx.php !!!see the mvc samples!!! |
MySQL | Sample how to use |
MySQL_ | |
MySQLBuilder | create querys to create a insert or update query use addValue() to create a select query use addField() and addJoin() |
MySQLLang | handle a language table or database |
MySQLResult | |
OpcodeCache | based on APC, to use Memcache instead see the config.inc.php - if you use Memcache and the Server is not available, the class try to failover to APC Memcached Version >= 2.0.0b2 with libmemcached up to 0.49 is recommended |
Native PDF library based and derived on TCPDF of Nicola Asuni (http://www.tecnick.com) tanti saluti alla Italia and special thanks to Olivier Plathey (http://www.fpdf.de/) $pdf = new PDF(); $pdf->setPDFVersion('1.3'); $pdf->addPage(); for extended/full unicode support see the readme in the font directory and the variable $GLOBALS["CRVCL"]["FONT_EXTENSION_PATH"] in the config.inc.php // standard $pdf->setFont('Arial', '', 10); // extended (koi8-ru, koi8-r, iso8859-15, iso8859-10, iso8859-9, iso8859-8, iso8859-7, iso8859-6, iso8859-5, iso8859-4, iso8859-3, iso8859-2, iso8859-1) $pdf->setFont("TimesUnicode", '', 9); // full unicode support (but create big pdf files) $pdf->setFont("ArialUnicodeMS"); $pdf->text(10, 10, 'Test PDF'.U_EURO); $pdf->output('./test.pdf'); for more unicode fonts see the fonts directory of the framework |
|
process_pid | create pid files like a linux daemon, to lock a script at the time a other process use it |
QRCodeMinified | |
Redis | |
RESTful | |
RESTful_Client | $rest = new RESTful_Client(); $rest->m_trace_path = $GLOBALS["DOCROOT"].'/logs/'; $rest->m_server = "rest.domain.com"; |
RESTful_Server | |
RSS | |
rtf | |
sasl | |
sasl_basic | |
sasl_cram_md5 | |
sasl_digest | |
sasl_interact | |
sasl_login | |
sasl_ntlm | |
sasl_plain | |
SepaRecord | Sample: $sepa = new SepaXML(); $sepa->setDebitorValues('CR-Solutions.net', 'DE12500105170648489890', 'DEUTDEDBMUC'); $sepa->setCurrency('EUR'); $sepa_rec = new SepaRecord(); $sepa_rec->setName('Mr. Bill Gates'); $sepa_rec->setBIC('UBSWCHZH80A'); $sepa_rec->setIBAN('CH3908704016075473007'); $sepa_rec->setAmount(1.00); $sepa_rec->setReason('Test'); $sepa->addRecord($sepa_rec); $sepa->generateXML('./sepa.xml'); |
SepaXML | Sample: $sepa = new SepaXML(); $sepa->setDebitorValues('CR-Solutions.net', 'DE12500105170648489890', 'DEUTDEDBMUC'); $sepa->setCurrency('EUR'); $sepa_rec = new SepaRecord(); $sepa_rec->setName('Mr. Bill Gates'); $sepa_rec->setBIC('UBSWCHZH80A'); $sepa_rec->setIBAN('CH3908704016075473007'); $sepa_rec->setAmount(1.00); $sepa_rec->setReason('Test'); $sepa->addRecord($sepa_rec); $sepa->generateXML('./sepa.xml'); |
SessionHandlerMemcache | Memcached Version >= 2.0.0b2 with libmemcached up to 0.49 is recommended |
SessionHandlerMySQL | |
SessionHandlerMySQLi | |
SessionHandlerRedis | |
shm | require Shared Memory libraies (SHMOP), useful for Inter-process communication and used by daemon.lib.php |
sitemap | // Sample 1 |
SocialLib | provide social network functions from http://developers.facebook.com and https://dev.twitter.com |
sphinxAPI | Sphinx PHP searchd client API, derived from sphinxapi.php of Andrew Aksyonoff / Sphinx Technologies Inc. (http://www.sphinxsearch.com/) |
sphinxQL | Alias for sphinxAPI with extended methods for sphinxQL (sphinxQL implementation require sphinx version >= 2.0.1-beta and use only methods from sphinxAPI/sphinxQL not SphinxClient) |
sphinxQLBuilder | |
sphinxResult | create a object from the sphinx api array result |
SQLiteDB | |
SQLiteDB_ | |
SQLiteDBBuilder | create querys to create a insert or update query use addValue() to create a select query use addField() and addJoin() |
SQLiteDBResult | |
template | support if conditions in tamplate |
TimeTrace | |
Viewer | super class for the representation of the viewer (alias for ControllerMain) |
whoisrequest | |
WSThread | use !Thread::isThreadRun() in the main thread to not destroy the return value with echo/print or other outputs |
XDXF_Parser | Parser for XML Dictionary Exchange Format, for more see http://xdxf.revdanica.com To download dictionaries see the project website or visit http://xdxf.revdanica.com/down/index.php or http://www.dicts.info/uddl.php for the latest files. By obtaining, using and/or copying data of any XDXF file, you agree that you have read, understood, and will comply with the terms and conditions of this XDXF file. |
xml2array | |
xmlHelper | |
XMLRPC | XML-RPC basic class, used from XMLRPC_Client and XMLRPC_Server |
XMLRPC_Client | XML-RPC client |
XMLRPC_Server | XML-RPC webservice, donīt use echo/print for webservice script, echo/print send back information to the XML-RPC host, don't forget to catch errors |
zipLib | Sample how to use |
Interfaces summary
html_iComponent | |
icrVCLSessionHandler |
Traits summary
html_tComponent |
Functions summary
_ISO_Lang_Convert | convert a language ISO 639-1 to ISO 639-2 code or a language ISO 639-2 to ISO 639-1 |
acount | like count(), but return -1, if type not array |
add_trailing_slash | |
addAjaxAnswerToElement | add the respone of an ajax request to the innerHTML of an element (usefully as sample for implementation of infinite scrolling) addAjaxAnswerToElement("pnl1", 0); addAjaxAnswerToElement(array("pnl1", "pnl2"), 0); CAVE: use the same order for the elements like in the multi ajax response |
ajax_callback | this function create a AJAX callback for request's to send a request call "ajax_request" with the callback, this function create the js code as sample for onclick event readyState(s): 0 = uninitialized 1 = loading 2 = loaded 3 = interactive 4 = complete / status 200 ok all AJAX request pipes will be handeled over the global javascript object "fw_AjaxHandler" |
ajax_request | create the js code for a ajax request all AJAX request pipes will be handeled over the global javascript object "fw_AjaxHandler", to abort a (delayed) request use fw_AjaxHandler.abort(); , to check in your code a method is called from ajax check the define MVC_AJAX_EVENT is true to abort a (delayed) request use fw_AjaxHandler.abort(); CORS requests require to be async and server response header "Access-Control-Allow-*", use as sample the function "enableCORS" to allow |
ajax_setFormData2Fragment | return the js code to set post data as fragment fragment sample: edtXY^Hello/edtXX^World |
ajax_setFragment2FormData | return the js code to set all fragments passed by url to existing form elements fragment sample: para1^Hello/para2^World to check a fragment parameter exists use the js function "getFragment" |
ajax_translate_special_char | |
Ansi2OEM | Convert string from ANSI to OEM |
apache_request_headers | |
apc_opcode_priming_compiler | |
array2js_form_set | create a js code from an array to set the values dynamically to html from components without recreate the element or replace dynamically complete html components (usable for ajax callbacks, see mvc samples), sample: $a = array( 'edt1'=>"Sample", // set the value 'txt1'=>"Hello World", // set the value 'rad1'=>'val2' // select the value, 'chk1[]'=>array('val1', 'val2'), // select the value's 'lst1[]'=>array(1,1,0,0,0), ) ); // fill form values OR $a = array( 'pnl1'=>$lnk-html(), 'pnl2'=>$txt-html() ); // fill component panels with HTML (require base64 encoding) |
array2js_from_set | |
Array2strAttribute | convert an array like array('color'=>'green','size'=>'50x50') to a string like "color:green; size:50x50;" |
array2string | convert an array to a string, work similar to serialize |
array2UrlData | convert a data array to a url |
array_combine_values | return the array with value as key for a value |
array_concat | concat array values of same key |
array_del | remove all elements where the key contains the substring |
array_filelist | list of files as array |
array_gcd | greatest common divisor of an numeric array |
array_insert | insert a value to an array with numeric index |
array_isearch | performs the same function as array_search except that it is case insensitive |
array_key_existsEx | take the performance advantage of isset() while keeping the NULL element correctly detected of array_key_exists() |
array_lcm | least common multiple of an numeric array |
array_mix | |
array_remove_empty | remove all empty elements from array |
array_search_inner | search for a value in a subkey of an array Sample: array_search_inner(getCountryList(), 2, 'United States'); |
array_search_key | search for a key or key with val in the next dim if you search only for key you get the val of located key if you search for a key with val you get the located key of the last dim (useful for fechted MYSQL rows) Sample: $rowpos = array_search_key($rows, "Variable_name", "Table_locks_waited"); $locks_wait = $rows[$rowpos]["Value"]; |
array_search_needle | search a needle in a one dim array |
array_trim | remove all elements where the key not contains the substring |
array_xunique | same like array_unique but retain key order if key is a number |
ascii_non_visible_decode | remove non visible ascii chars |
authcode | create a authorization code with 32 char from the passed id value + UNIX timestamp or return an array with with the id and timestamp informations of the authcode, used for the download manager, see the samples |
authenticate | request the client to authenticate and return the user and password as array, if no authentication is send by client the function return HTTP Error 401 to the client and abort the script. To abort after checking the user and passwort use the function "unauthorized" |
average | get the average from array values |
bandwidth2byteInt | string like 25kb/s or 25mb/s or 512Kbit/s or 1Mbit/s |
base64_encode_bin | binary save base64 encode |
bitInValue | check a bit is set in value, support also return of a MySQL SET field |
bitVal2array | return all possible bit numbers of a value in a array, samlpe 44 => 4,8,32 |
boolstr | bool as string |
boolToSetting | bool as html setting string |
boolval | get boolean from value |
boolvalEx | get boolean from value like boolval, but handle a string "false" as false (like old boolval function from crVCL Version <= 2.5 and before PHP 5.5.x) |
breakpoint_set | set a breakpoint id |
breakpoint_stop | stop if breakpoint id exists |
breakpoint_watch | add infos to a breakpoint id |
browserSupportAjax | check a browser support AJAX (require 'browscap', for more see PHP documentation) |
byte2str | return the bytes human readable |
calculate_RFC2104HMAC | calculate signature using HMAC: http://www.faqs.org/rfcs/rfc2104.html |
cast_str | cast a string automatic to the right type |
checkdnsrr | Check DNS records corresponding to a given Internet host name or IP address |
checkEmail | checkEmail |
chrEx | return ASCII char of value (support utf8 chars) |
cidr_match | check a IP is in the range of a subnet sample: cidr_match('192.168.1.55','192.168.1.0/24'); |
clearscreen | to clear the console screen |
com_create_guid | generate a globally unique identifier (GUID) |
copyEx | copy a file with memory mapping techniques if supported by your OS to enhance performance |
cpu_get_usage | Returns the amount of cup allocated to PHP in percent, false on error (require linux "ps" command) |
create_menu | create a menu from a menu-config file, if the config file not exist the function try to create |
createVisiblePageRank | |
CRLF_fix | convert unix, linux, mac and currupt (mixed) line seperated strings to uniform windows format |
cron_scheduling | check for scheduling like crontab (require crDateTime object) alias for function "interval", for samples see function "interval" |
crVCLProfiler | |
cursor_color | |
cursor_down | |
cursor_erase_eol | |
cursor_erase_line | |
cursor_erase_sol | |
cursor_left | |
cursor_pos | |
cursor_restore | |
cursor_right | |
cursor_save | |
cursor_unsave | |
cursor_up | |
data_uri | data_uri('/var/www/mypage/images/xyz.png','image/png'); |
date2MySQLDate | if string is empty, it will result the current datetime |
date2Timestamp | convert a date string to timestamp |
dateFormat | format a date string formats: d => day with null on beginning (ex: 01) j => day without null on beginning (ex: 1) m => month with null on beginning (ex: 08) n => month without null on beginning (ex: 8) y => year with 2 digits (ex: 97) Y => year with 4 digits (ex: 1997) H => 24-Hour format with null on beginning ( 00-23) h => 12-Hour format with null on beginning (01-12) g => 12-Hour format without null on beginning (1-12) G => 24-Hour format without null on beginning (0-23) i => minutes (00-59) s => seconds (00-59) D => weekday name abbreviation (ex: Sun) l => complete weekday name (ex: Sunday) M => month name abbreviation (ex: Feb) F => complete month name (ex: February) samples: dateFormat("20060101235527","dmYHis",false,false,"de") => 01.01.2006 23:55:27 dateFormat("2007-08-23 23:55:27","YMd",false,false,"us") => Aug 23 2007 dateFormat("2007-08-23","d.m.Y") => 23.08.2007 |
dateToMySQLDate | if string is empty, it will result the current datetime |
debug_backtrace_string | debug backtrace as string |
debugbreak | kill the script and show timestamp or timestamp with string Sample debugbreak("ok"); |
debugOut | output to the debug popup of the "html_Doc" |
DEC2DMS | Converts decimal longitude / latitude to DMS |
dec2str | convert a decstring to a string |
decryptEx | own algorithm decryption |
deepCopy | make a deep copy of a object instead of a shallow copy for a shallow copy of the object use the final keyword "clone" the advantage of a deep copy is that A and B do not depend on each other, but at the cost of a slower more expensive copy |
defineEx | similar to the function "define", but with a check if it is already defined |
diffDays | Sample: if(diffDays('', $lastalert) >= $xDays){ ... } |
diffHour | Sample: if(diffHour('', $lastalert) >= $xHours){ ... } |
diffMin | Sample: if(diffMin('', $lastalert) >= $xMin){ ... } |
diffSec | Sample: if(diffSec('', $lastalert) >= $xSec){ ... } |
dir_exists | checks whether a directory exists (alias for file_exists) |
DMS2Array | convert a DMS string like 48 deg 8' 45.83" N to an array like array('deg'=>48,'min'=>8,'sec'=>45.83) |
DMS2DEC | Converts DMS ( degrees / minutes / seconds ) to decimal format longitude / latitude Sample: // Lat: 48 deg 8' 45.83" N and Long: 11 deg 40' 29.26" E echo 'https://www.google.com/maps/place/'.DMS2DEC(48,8,45.83).','.DMS2DEC(11,40,29.26); |
dns_get_mx | Get MX records corresponding to a given Internet host name. See also PHP documentation |
download | download a file (it is recommended to use "ignore_user_abort(true);") support also resume/HTTP-Range error codes: 1 = file not found 2 = connection aborted 3 = can't read file 4 = size error 5 = HTTP headers already sent 6 = Requested Range Not Satisfiable |
download_authcode_url | set all required informations for a secure download to the session and return the url for the download (session is required) see the samples of the download manager |
download_from_authcode | download a file from an authorization code, use the function "download_authcode_url" to get the url with the authcode (session is required, ignore_user_abort(true); recommended) error codes: 11 = GET parameter authcode is missing 12 = invalid authorization code for this session 13 = authorization code decrypt error 14 = invalid authorization code, manipulation detected 15 = authorization code expired, download access denied 16 = file not found this function use internal the function "download", see also the error codes thereof see the samples of the download manager |
download_iframe | start a download |
download_popup | start a download |
enableCORS | set the headers to allow CORS requests be sure you not use htaccess rewrites like: RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] which prevent calling this function Sample: enableCORS(array('mydomain.')); |
encryptEx | own algorithm encryption |
escape_js | escape a php string to use it for php inline javascript |
EU_VAT_Validate | validate a EU VAT id, return true, false or null if it's not possible to validate (use it only to pre-validate) |
even | |
extractFileExt | get the extension of a file |
extractFileName | get the name without extension of a file |
file_get_mimetype | detect the mime type of a file, similar to function "mime_content_type" |
file_read | read a file, it is possible to do this chunked and like readfile in outbuffer, !$stdout => return buffer as string or false on error | $stdout => return bytes as int (-99 if user aborted connection) |
file_write | write a file |
fileExist | same like is_file, but work on remote files (require fopen wrappers, allow_url_fopen = true) |
filepermsEx | gets file permissions chmod-like |
firebugOut | send a message to the Firebug console (also supported for IE version >= 10), return the js code to access firebug samples: firebugOut('123', FIREBUG_INFO); firebugOut(array('m1'=>111)); firebugOut(array('m1'=>array('1',2))); firebugOut(array('m1'=>array('l1'=>'Hello','l2'=>'World'))); firebugOut(array('m1'=>array(FIREBUG_WARN.':1',2))); |
fix_https | replace all "http://" with "https://" or with "//" for protocol less url like for html, css and js if client access is via HTTPS |
fix_session_register | fix for removed Session functions, use only if realy required special thanks to [email protected] |
fixpath | cut the last slash if exist |
font | format a text or a block element |
free | deallocate space in memory |
ftok | Convert a pathname and a project identifier to a System V IPC key, see also PHP documentation |
fw_exception_error_handler | |
fw_mvc_reset_component_changed | create the js code to reset the form component changed state, if the component is replaced via ajax |
fwErrorHandler | |
fwExceptionHandler | |
gc_collect_cycles_overX | execute gc_collect_cycles() only if the current memory usage is over X percent and not between ratio, "zend.enable_gc" must be "On" (if memory limit is not set as sample for CLI it collects only if more than 256M used). Returns number of collected cycles or -1 if GC is disabled. |
gcd | greatest common divisor |
get_browserEx | same like function "get_browser", but try to get fresh browscap.ini from net or using local browscap.ini from crVCL with native parser from Alexandre Alapetite, http://alexandre.alapetite.fr/cv/ |
get_defined_constantsEx | same like "get_defined_constants" from core but faster on recursive use |
get_file_from_url | try to download a url as file, support follow location and use user agent (require CURL) |
get_include_contents | using output buffering to include a PHP file into a string |
get_Post_RAW_Data | get the Post RAW Data of a HTTP POST Request, useful for XML-RPC |
get_profiler_info | return the crVCL Profiler Infos (should called at end of script/application) |
getAlexaPageRank | get the alexa page rank, return the page rank as integer or html content as string (http://developer.amazonwebservices.com/connect/entry.jspa?externalID=402&categoryID=34) |
getallheadersEx | return an array or string all requested headers, should work with all webserver |
getallheadersSize | return size of request header, useful to check for to big headers because as sample Apache and the most proxy servers are limited default to 8K and IIS to 16K |
getBrowser | |
getClientLanguage | return the main/first language of a Webbrowser |
getCountryList | return a array with all known TLD country codes with language in German and English |
getEthnicList | based on MARC 21 Code List for Geographic Areas of http://www.loc.gov/marc/geoareas/gacshome.html |
getFrameworkCSS | |
getFrameworkJS | |
getGooglePageRank | get the google page rank, return the page rank as integer or html content as string (http://www.google.de/privacy.html) |
getLanguageList | return a array with all known RFC language codes (ISO 639-1 2 letter) with language in German and English |
getMonthList | return an array with month names (abbreviation and whole name) in different languages (now: DE, EN, ES, FR) |
getOrigin | get the Origin URL of a request |
getOS | |
getPHP_OS | get the OS of Webserver |
getPHP_Version | get the version of php |
getProxyInfo | check client comes through proxy and detect carrier, internal and external ip address + proxy ip, user-agent and request-time |
getQuarter | get number of quarter from a date string |
getRealIp | return real IP vs Proxy (see also function "getProxyInfo"), (attention, headers with IP infos could be manipulated in the internet) |
getScript | get script name |
getScriptPath | get script path |
getServer | getServer |
getSTDIN | read the STDIN |
getSubdomain | build a subdomain name from the current maindomian with the subname |
gettickcount | number of milliseconds since the Unix Epoch (0:00:00 January 1, 1970 GMT) Sample gettickcount(); |
getURL | getURL |
getURLPath | getURLPath |
getWeekdayList | return an array with weekday names (abbreviation and whole name) in different languages (now: DE, EN, ES, FR) |
googleCH | |
googleTranslator | use "Google AJAX Language API" to translate a text (require curl library) supported language pairs see: http://code.google.com/intl/de-DE/apis/ajaxlanguage/documentation/#Details and use the RFC language codes Return Values: on auto detect an array with translated text as UTF-8 and detected language, else only a string with translated text as UTF-8 |
GUID | Generate a globally unique identifier (alias for function UUID) |
guidEx | create a unique global id that is min. 128 BIT strong (unformated 32 hex chars long (16 decimal values), formated up to 37) the first 14 chars reprensent a timestamp this function is create more clear unique id's, optional with more then 128 Bit |
gzdecodeEx | decode a gzip compressed string |
header_cache | set caching headers, must be set before output like print .... |
header_http_error | send headers for http error Sample: header_http_error(HTTP_OK); header_http_error(111, "custom error"); header_http_error(HTTP_INTERNAL_SERVER_ERROR, null, true, "database error"); header_http_error(HTTP_SERVICE_UNAVAILABLE); header('Retry-After: 300'); header_http_error(HTTP_TEMPORARY_REDIRECT, null, false, '', $url); |
header_nocache | send headers to disable cacheing, must be set before output like print .... |
hex2rgb | convert a hexstring to a rgb array |
hex2str | convert a hexstring to a string |
html2text | convert html/text to plain/text |
html_entity_decode | Convert all HTML entities to their applicable characters |
htmldecode | Convert all HTML entities to their applicable characters for php 4 < 4.3.0 for php 4 >= 4.3.0 you should use html_entity_decode |
http | replace all https:// to http:// |
httpAuth | send http authentication via header |
https | replace all http:// to https:// |
imagick_fingerprint | return a base64 fingerprint hash of an image to check similarity, this fingerprint's can be stored to a database or compared as sample with function "similar_text" Sample: $fp1 =imagick_fingerprint($image1, 80); $fp2 =imagick_fingerprint($image2, 80); $percent = 0; similar_text($fp1, $fp2, $percent); echo 'similar to ' . $percent . '%'; |
in_arrayEx | checks if a value exists in an array (faster than the original PHP function) |
iniBuffer2BlockArray | internal function for iniRead and iniWrite |
iniRead | can read settings from ini-files and conf-files to read from a conf-file $section must be empty if ini file and empty $var it return all vars names of section as array |
iniWrite | can write settings to an ini-files and a conf-files to write in a conf-file $section must be empty to delete a setting set $val empty, for empty var set it to ' ' |
interval | check for scheduling like crontab (require crDateTime object) min / hour / day of month / month / month day of week Sample: interval('36-05 * * * ', $lastrun); interval(' * * * ', $lastrun); interval(' * * * Fri', '2011-09-02 00:00:00'); interval('* * * * Mon-Wed', $lastrun); |
intval32 | |
is_base64_encoded | check a string is base64 encoded |
is_bin | check string is binary |
is_crawler | return true if the user agent is a known spider / crawler / robot |
is_date | |
is_https | check the connection from client to the script is over HTTPS, independent from internal connections over WAN as sample CDN to webserver or loadbalancer to webserver |
is_IE | detect the Internet Explorer Return boolean or version number and for not IE -1 |
is_mobile | return true if the user agent is a mobile phone (and not forced desktop view) and try to resolve the device type (OS) and Browser |
is_number | check value is a number |
is_robot | return true if the user agent is a known spider / crawler / robot |
is_spider | return true if the user agent is a known spider / crawler / robot |
is_ssl | check the connection from client to the script is over HTTPS, independent from internal connections over WAN as sample CDN to webserver or loadbalancer to webserver (alias for function "is_https") |
is_utf8 | check the string is utf-8 (for better utf8 support, it use internel the function 'mb_detect_encoding' if exists) |
is_utf8Ex | check the string is utf-8 |
is_windows | return true if the terminal is from a windows machine |
iso_decode | decode iso formated text to ASCII |
ISOLang2Letter3Letter | convert a language ISO 639-1 to ISO 639-2 code |
ISOLang3Letter2Letter | convert a language ISO 639-2 to ISO 639-1 |
issetOr | use/set a default value if variable is not set |
js | print string as Script |
js_getFormData | implementation of js function getFormData(), get GET/POST data form form elements as GET/POST string (usable for ajax) |
js_mailto | create a mailto js code as sample for onClick event |
js_removeFormData | useful to remove request parameters on form submit Sample: $frm->m_onSubmit = js_removeFormData(array('btnSearchSumbit')); |
js_safeEMail | create a variable encoded spam safe email for as sample to use with mailto |
JSON_FixDoubleSerialization | |
JSON_FixSingleElementArray | fix JSON elements where an numberic array is expected instead of a single element Sample: array( 'items'=>array('val1'=>1,'val2'=>2) ) will be converted to array( 'items'=>array(0 => array('val1'=>1,'val2'=>2)) ) |
lcm | least common multiple |
left | get chars from left |
levenshtein_ratio | |
levenshteinEx | fast levenshtein implementation without length limit |
linefeed_detect | detect the linefeed (wordwarp) of an string this function is an alias for wordwarp_detect |
luhnCheck | credit card luhn check (maestro) Return Values: return default true/false if the parameter $retInfo true, it return a array with the card type name |
marquee | marquee |
mb_str_replace | Replace all occurrences of the search string with the replacement string |
measure | measure execution time from point to point return null if a id is not init or the time in ms (mu) frome the last measure point Sample: measure(METHOD.'mysql_query'); // some code echo 'duration: '.measure(METHOD.'mysql_query').' ms'; |
mix | |
mount | mount a volume under linux |
move | move a file, similar to mv of linux systems |
msgbox | print js alert, sample msgbox("test"); |
mssleep | programm delay in ms |
mvc_ajax_event | to call a mvc method via AJAX callback, as sample from a onclick event of a button, the method "initComponents" from the ControllerPage will be prevent for AJAX, to check in your code a method is called from ajax check the define MVC_AJAX_EVENT is true to abort a (delayed) request use fw_AjaxHandler.abort(); CORS requests require to be async and server response header "Access-Control-Allow-*", use as sample the function "enableCORS" to allow |
mvc_alert | mvc implementation of javascript alert |
mvc_component_changed | js code return true, if the specified html form component has changed |
mvc_confirmbox | mvc implementation of javascript confirmbox, the result will be saved in $this->getReq()->val('mvc_confirm') / $_REQUEST['mvc_confirm'] to check it after a request (mvc_event/mvc_ajax_event) you can use it also in combination with an AJAX callback like: mvc_confirmbox("do you confirm?", '', 'return false;').mvc_ajax_event(0, $GLOBALS['DOMAIN'].'/index.ajax.php', 'myclass', 'doSomething'); |
mvc_event | to call a mvc method, as sample from a onclick event of a button |
mvc_flags | set additional flag's (simple parameter only), the values will be saved in the request and can be restored after the request (mvc_event/mvc_ajax_event) with the method "getFlags" |
mvc_prompt | mvc implementation of javascript prompt, the result will be saved in $this->getReq()->val('mvc_prompt') / $_REQUEST['mvc_prompt'] to check it after a request (mvc_event/mvc_ajax_event) you can use it also in combination with an AJAX callback like: mvc_prompt("input a value:", '', 'return false;').mvc_ajax_event(0, $GLOBALS['DOMAIN'].'/index.ajax.php', 'myclass', 'doSomething'); |
mysql_isDateEmpty | reverse alias for function "mysql_isDateSet" return true if the value of the datetime field is '1970-01-01 00:00:00' or '0000-00-00 00:00:00' or empty |
mysql_isDateSet | usefull to check a datetime field is used for mark/flag rows as sample as deleted return true if the value of the datetime field is not '1970-01-01 00:00:00' or '0000-00-00 00:00:00' |
mysql_SET_isCondition | check MySQL SET field conditions, alias for function "bitInValue" |
mysql_unix_timestamp | mysql_unix_timestamp, sample mysql_unix_timestamp("2005-06-22 13:15:33"); |
MySQLFilter | SQL Injection Protection MySQLFilter |
normalize | normalize accent's and umlaute |
normalize_filename | remove not allowed special char's in a file name and replace them with "_" |
object2array | convert a object to an array (used also by function "print_pretty") |
OEM2Ansi | Convert string from OEM to ANSI |
optimizeCSS | Minifying the following CSS resources |
optimizeHTML | Minifying the following HTML resources |
optimizeJS | Minifying the following JavaScript resources |
ordEx | return ASCII value of character (support utf8 chars) |
parse_include | parse all "Include" like "Include ./custom.conf" in linux like config files |
parseCmdPara | pare the assigned parameters to a CLI script samples for parameters: -uroot -u root --user=root |
parseHeaders | parse a http header string |
passwordStrength | check password strength same function exists as JS function, see the fwtools.inc.js |
pcntl_pid_exists | check the process with the passed pid is still running |
phpinfoEx | Outputs or returns the phpinfo content (you can use own CSS style) possible style attributes: {}, pre {}, a:link {}, a:hover {}, table {}, .center {}, .center table {}, .center th {}, td, th {}, h1 {}, h2 {}, .p {}, .e {}, .h {}, .v {}, .vr {}, img {}, hr {} sample: $CustomCSSFormat = "td, th { border: 1px solid #a2aab8; vertical-align: baseline; }"; phpinfoEx(INFO_ALL, false, false, $CustomCSSFormat); |
portscan | portscan |
pp | pretty print for arrays and objects |
pp_xml | pretty print XML and validate the string via php "DOMDocument" class |
preg_last_error_msg | returns the error message of the last PCRE regex execution |
print_ajax | print the ajax code as utf8 encodeed text, for right charset output |
print_br | print a string with or only |
print_chunked | print the output chunked |
print_d | make a formated print_r() Sample print_d(array("1=>"Hello","2=>"World")); |
print_gz | try to print in gz mode (use header Vary: Cookie for not static content) |
print_pretty | pretty print for arrays and objects (alias for pp) |
print_pretty_xml | pretty print XML and validate the string via php "DOMDocument" class |
protocol | return the protocol used from client as string |
pwGen | password generator |
quoted_printable_encode | Convert a 8 bit string to a quoted-printable string |
random | get random value between min and max |
redirect | call function "header_http_error" to redirect, but also flush content and session and exit immediately |
remove_tags | function to remove comlete tags from html |
request_async | make an asynchron request to a url without wait for return content (useful to prefill caches) |
reset_last_modified_for_internal_http_cache | reset internal last modified time used by internal caching (useful for handle login/logout flushing HTTP caches) |
rgb2hex | convert a rgb array to a hexstring |
rgb2hsb | calculate HSB from RGB |
rgb2hsv | calculate HSV from RGB |
right | get chars from right |
runExternal | is a similar function like shell_exec / exec but can also execute external binarys like ffmpeg for linux |
rval | round an integer to next even number at n position |
ScriptProtection | Call XSSFilter and MySQLFilter |
sec2str | format sec. to a human readable string d:h:i:s |
seo_code_to_text_ratio | calculate the code to text ratio of a html string or a URL |
seo_keyword_density | calculate the keyword density of a html string or a URL |
seo_page_informations | return seo relevant page informations of a html string or a URL |
session_clean_user_cookies | try to remove all cookies of a user |
session_commitEx | commit the session without close (reopen the session) |
session_end | best way to unset session |
session_expires | to expire a session after X sec. |
session_is_started | checking session status |
session_logout | do a clean logout |
setAjaxAnswerToElement | replace the innerHTML of an element with the respone of an ajax request setAjaxAnswerToElement("edt1", 0); setAjaxAnswerToElement(array("pnl1", "pnl2"), 0); CAVE: use the same order for the elements like in the multi ajax response |
setting_sqlite_read | can read settings from SQLite files created with function "setting_sqlite_write" |
setting_sqlite_write | can write settings to an SQLite file to delete a setting set $val empty, for empty var set it to ' ' require sqlite.lib.php |
showFrameworkError | |
shutdown_function_crVCL_FatalError | |
socket_writeEx | |
space | return a number of space char or html space |
str2bin | mode = 1 default, mode = 2 human readable, mode = 3 array |
str2byteInt | convert a string to bytes as integer |
str2dec | convert a string to a decstring |
str2hex | convert a string to a hexstring |
str2sec | convert a time string to integer seconds, sample: $sec = str2sec("5days"); |
str_del | |
str_extract | Sample: $text = 'I like developing' echo str_extract($text, 'I', 'developing'); |
str_getAttributeVal | |
str_getCssValue | |
str_parse_tags | |
str_random | return a random string |
str_replace_bin | |
str_trim_len | |
strAttribute2Array | convert a string like "color:green; size:50x50;" to an key value array |
strax | ax a string |
strcut | return the string before/till the needle, if not found the complete string (similar strcut of C++) |
strcut_bin | return the string before/till the needle, if not found the complete string - binary safe (similar strcut of C++) |
strftimeEx | same like function strftime, but expect as second parameter a valid datestring |
strhtmlformat | |
stricut | return the string before/till the needle, if not found the complete string - case insensitive (similar strcut of C++) |
stricut_bin | return the string before/till the needle, if not found the complete string - case insensitive - binary safe (similar strcut of C++) |
string2array | convert a string to an array, work similar to unserialize, but string length secure |
strip_chars | remove wasted chars |
strip_linebreaks | remove all line breaks from a string (\r\n - on a windows computer, \r - on an Apple computer, \n - on Linux) |
strip_spaces | remove unnecessary spaces from a sentence |
stripHTML | strip a HTML based String (c) Shirley Kaiser, SKDesigns (http://websitetips.com/articles/optimization/html/crunch/) |
stripInvalidXml | Removes invalid XML |
stripos_bin | binary safe version of stripos independent of "mbstring.func_overload" and unicode |
stripWhiteSpace | strip white spaces from a String (c) Shirley Kaiser, SKDesigns (http://websitetips.com/articles/optimization/html/crunch/) |
strlen_bin | return the real binary len of a string independent of "mbstring.func_overload" and unicode |
strOrd | |
strpos_bin | binary safe version of strpos independent of "mbstring.func_overload" and unicode |
strpos_next_word | |
strrcut | return the string from the needle till the end of string, if not found the complete string (similar strcut of C++) |
strrcut_bin | return the string from the needle till the end of string, if not found the complete string - binary safe (similar strcut of C++) |
strricut | return the string from the needle till the end of string, if not found the complete string - case insensitive (similar strcut of C++) |
strricut_bin | return the string from the needle till the end of string, if not found the complete string - case insensitive - binary safe (similar strcut of C++) |
strripos_bin | binary safe version of strripos independent of "mbstring.func_overload" and unicode |
strrpos_bin | binary safe version of strrpos independent of "mbstring.func_overload" and unicode |
strrpos_next_word | |
strtolower_bin | binary safe version of strtolower independent of "mbstring.func_overload" and unicode |
strtonum | convert a string to a real number |
strtoupper_bin | binary safe version of strtoupper independent of "mbstring.func_overload" and unicode |
strzero | prefix zero |
strzerocast | if value is zero it returen empty in place of zero |
substr_bin | return the real binary len of a string independent of "mbstring.func_overload" and unicode |
terminal_beep | |
terminal_cols | |
terminal_lines | |
text2html | convert plain/text to html/text sample: $str = "Hallo\r\n Test\r\n http://www.cr-solutions.net \r\n www.panthermedia.net \r\n [http://www.cr-solutions.net cr-solutions.net Homepage]\r\n Test\r\n http://en.cr-solutions.net/images/CR-Solutions.png|img [http://en.cr-solutions.net/images/CR-Solutions.png|img Logo]" $cap = new cap_str(); $cap->m_grid_grain_size = 0; $cap->m_fcolor = "#000000"; $cap->m_transparentcolor = "#EBF0F6"; $cap->m_bgcolor = "#EBF0F6";$cap->m_fsize = 10; $cap->m_width = "155px"; $cap->m_height = "20px"; $cap->m_font = "arial.ttf";$cap->m_useGD2 = false; $email_as_img = array('path'=>'/var/www/tmp', 'uri'=>'tmp', 'capobj'=>$cap); $html = text2html($str, null, $email_as_img); |
timestamp2MySQLDateTime | unix timestamp to MySQL DateTime |
trim_specialchars | remove all special chars from string (or replace it by $replace) |
trim_text | trims text to the last space of given length, then adds ellipses if desired |
umount | unmount a volume under linux |
unauthorized | return HTTP Error 401 to the client and abort the script |
unicode_array | array with special unicode chars array( array( |
unique_key | get unique key for queries and other long keys |
unix2DosTime | return a dos timestamp |
unlink_files | delete file from a directory sample: unlink_files("/tmp", "5days", ".csv", 0777); |
unpack31 | same like unpack, but read it as a 31 bit number instead of 32 a bit number |
unserializeEx | creates a PHP value from a stored representation like unserialize, but try to fix serialization length offset errors |
unserializeEx_v1 | |
unserializeEx_v2 | |
unzip | unzip a zip archive Sample Return for $file_list => array('file1.txt', 'subdir/file2.txt') |
urlData2Array | convert a url to a data array |
utcdate | UTC formated datetime |
utf8_encodeEx | convert the string to uft-8 (with fix, require iconv lib for other charsets than ISO-8859-15) |
utf8_fix | convert the string to uft-8 if is required (require iconv lib for other charsets than ISO-8859-15) |
utf8_to_RTF | encode utf8 to rtf |
UUID | Generate a Universally Unique Identifier with 38 chars |
validateEmail | validate an email adress |
var_dumpEx | Outputs or returns a parsable string representation of a variable without the limitations of "var_export", because the function "var_export" has a limitation to handles "var_dumpEx" needs output-buffering, do not use in combination with ob_start() |
var_dumpExHTML | Outputs or returns a parsable string representation of a variable HTML formatted without the limitations of "var_export", because the function "var_export" has a limitation to handles "var_dumpEx" needs output-buffering, do not use in combination with ob_start() |
var_name | get the name of a variable Samples: var_name($var); // check a variable var_name($local_func_var, get_defined_vars()); // check a local function variable var_name($myobj->m_var,$myobj); // check a class member variable |
waitForInput | wait for a user action and return the user input |
wordwarp_detect | detect the wordwarp of an string |
writeTrace | write a trace file |
wsthread_exception_error_handler | |
XML2JSON | convert XML to normalized JSON (convert XML attributes to regular JSON without '@attributes') |
xmlentities | |
xmlentities_decode | |
xmlentitiesEx | extended with html entities |
xmlGetPara | xmlGetPara |
xmlGetVal | xmlGetVal |
xor32 | |
XSSFilter | Cross Script Protection XSSFilter |
zeroFill | |
zlib_compression | zlib_compression |