Static methods which 'generate'.
package | dstruct_common |
---|
mailTo(string $email, string $linktext, string $anchortitle, string $class)
If JS is not available,, you can encode the email address with toASCIIEntities(). The document.write() line from the out put MUST NOT be split over multiple lines when output to the browser.
string
Is encoded.
string
The text which will show in the browser. Is encoded.
string
Text for the HTML 'a' element title. Is encoded.
string
Any class(es) you want on the HTML 'a' element
password(integer $charcount, integer $characters, integer $case, string $exclude, string $include) : string
integer
Number of characters required in output
integer
Hex characters or Alpha-Numeric output
integer
Upper, Lower or Mixed case
string
Characters not allowed in password
string
Characters allowed in password which are not otherwise included
string
postRequest(string $url, array $data, string $optional_headers)
link | http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/ |
---|
string
The target page
array
e.g. 'id' => 3, 'name' => 'myname'
string
Additional HTTP headers that you would like to send in your request.
pullPage(string $host, string $usepath, string $postdata) : string
Origin of this method?
string
Host
string
Path of URL
string
POST data
string
toASCIIArray(string $str) : array
string
array
toASCIIEntities(string $str) : string
string
string
truncatedText(string $text, integer $maxchars, boolean $forcelinebreak, string $oversuffix) : string
Useful for when inserting a summary of a longer bit of text somewhere. $forcelinebreak makes a break at the first \n (newline) regardless of whether line is short. $oversuffix is appended if the text is too long. Typically, it might be used to append '...' to the end of the output. If the text is shorter than $maxchars then the original text is returned. Should be UTF-8 safe.
string
Text to truncate
integer
Maximum characters allowed in output
boolean
Break at first \n
string
Suffixed to the output if it was truncated.
string
CASE_LOWER : integer
CASE_MIXED : integer
CASE_UPPER : integer
CHARACTERS_ALPHA_NUMERIC : integer
CHARACTERS_HEX : integer