Check if a URL exists/is online.
2
A simple function (with support) that can provide the backbone to any templating system.
2
My previous entry on an easy to use SQLite interface for XUL/JS got me thinking: how many times have I had to write functions that were just wrappers for a little SQL?
Below is the fruits of that little query (excuse the pun). Forgive the dbXXX functions; my implementation depended on a small portion of a larger mysql library that I've grown accustomed to coding with.
Below is the fruits of that little query (excuse the pun). Forgive the dbXXX functions; my implementation depended on a small portion of a larger mysql library that I've grown accustomed to coding with.
1
Best use of ob_, custom error handling, and variable variales evar: simple templating.
_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.
Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.
t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.
Play around with t(..) to find out more; I don't feel like documenting it.
_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.
Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.
t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.
Play around with t(..) to find out more; I don't feel like documenting it.
-9
By this class you can make a RSS FEED page in your website.
13
Pagination Class , I think everyone knew now what's it does and means
NT: This class written by my friend have phun!
NT: This class written by my friend have phun!
9
Grab a remote web document using sockets, with limited handling for 301 & 302 redirects.
12
Given a PHP array (even a deep nested array), returns a string representation of that array as JavaScript array. Useful when using PHP to output JavaScript.
24
"Today in the news, MySQL previews..."
As a "preview" of text, this MySQL select will return the first few words out of a text field in a database. It returns entire words (doesn't cut them off in the middle) and follows the last word with an elipse "..."
In the PHP, assign $CharactersToDisplay to a number - the approximate number of characters desired (or you can hard-code it if you want).
For the example, I also use $TheID as the row identity for the record to display.
As a "preview" of text, this MySQL select will return the first few words out of a text field in a database. It returns entire words (doesn't cut them off in the middle) and follows the last word with an elipse "..."
In the PHP, assign $CharactersToDisplay to a number - the approximate number of characters desired (or you can hard-code it if you want).
For the example, I also use $TheID as the row identity for the record to display.
14
MySQL 5.x Stored Routines, PHP Session Values, a little CSS oh my! Complex to set up but easy to impliment. Geared toward security, simplicity (of use) and convenience.
2
If it's a .php page, you can simply include this file where you want a hit counter to appear.
One file - text output. Very simple, very easy. Based off the filename of the page (creates a pagename.counter file to hold the count).
(No use for it myself - made it for a friend).
One file - text output. Very simple, very easy. Based off the filename of the page (creates a pagename.counter file to hold the count).
(No use for it myself - made it for a friend).









