Recursive PHP Syntax Checker
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.
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.
2
A simple function (with support) that can provide the backbone to any templating system.
3
Simple. It's parse_url, from PHP, implemented in Javascript. Seen a lot of similar ones around the web, but they were all bulky code and none of them took advantage of the RegEx parser in JS.
Applied as a member of the String prototype, so just call as myURL.parseURL(); Will return a named object with naming identical to that of PHP's function.
Additional: if first argument is present, will break the querystring up into name/value pairs, unescaped, and return that instead of the raw querystriing.
Applied as a member of the String prototype, so just call as myURL.parseURL(); Will return a named object with naming identical to that of PHP's function.
Additional: if first argument is present, will break the querystring up into name/value pairs, unescaped, and return that instead of the raw querystriing.
3
Search file directory (recursive method) with java language
3
Software Requirements:
Crypt_HMAC:
http://pear.php.net/package/Crypt_HMAC
HTTP_REQUEST:
http://pear.php.net/package/HTTP_Request
PEAR:
http://pear.php.net/
Crypt_HMAC:
http://pear.php.net/package/Crypt_HMAC
HTTP_REQUEST:
http://pear.php.net/package/HTTP_Request
PEAR:
http://pear.php.net/
3
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).
5
This detects screen resolution using javascript and makes it available to php by way of cookies.
2
Use this to print alternating values from an array.
It cycles through a series of values based on an iteration number.
For example, you could use this for alternating background colors.
It cycles through a series of values based on an iteration number.
For example, you could use this for alternating background colors.
5
Well after searching the internet for something similar to this, I didn't come up with anything...so I made my own! This simple script will track your members' time spent on your website. Please feel free to give comments/suggestions/feedback.









