/** * Scale an image according to input canvas dimensions. * No cropping will occur, the scaled image is "centered" to canvas. ...
public function setClass($class){
switch($class){
case "050":
...
PHP switch statement a good idea?
I'm making a switch stateme...
/** * Split the supplied timestamp string, add the seconds and concatenate the whole thing back into timestamp format. * Note! that the mktime function will perform even if the supplied amount of seconds exceeds 59. It just adds them ...
PHP Adding seconds to a MySQL t...
by Juha Hollanti,
July 14, 2008 13:38,
5 refactorings, tagged with php, mysql timestamp, conversion, add seconds
Suggestions are welcome. I'...
<?php /* * This is a test of a rules based iterative algorithm... ...
PHP Rules Based Iterator
by James Stansfield,
June 15, 2008 13:52,
1 refactoring, tagged with php, iterate, loop, array, rules
I had need for an iterative...
class XML_QNC
{
private $reader = "";
...
PHP XMLReader to Array Class
XMLReader is fast and uses ...
<?php
if (count($argv) != 3)
die("Usage: $argv[0] <RSS feed URL> <output dir>\n");
...
PHP Download all audio enclosur...
Given an RSS feed and an ou...
<?php
$std = fopen("php://stdin", "r");
echo "TICTACTOE\n\n\n\n";
...
PHP Command-Line TicTacToe
Just wondering if there are...
<?php
require_once("arc/ARC2.php"); // http://arc.semsol.org/
...
PHP Parse del.icio.us RSS feed
Uses ARC RDF parser from ht...
function db_cache_2($query)
{
// Query cache table
...
PHP DB Cache
by ellisgl.myopenid.com,
January 14, 2008 22:48,
8 refactorings, tagged with php, cache, mysql, update
It's a DB caching scheme th...
<?php
function fetch($url,$start,$end){
...
PHP Wikipedia API and text form...
by z3ro,
January 09, 2008 18:37,
4 refactorings, tagged with convert, html, plain html, formatting, parser, regex, xml, php, wikimedia, api, wikipedia
I need to add Wikipedia's i...
<? php
if $userinput = "http://www."
{
...
PHP Replace user input with link
by Mlopez,
January 02, 2008 01:39,
28 refactorings, tagged with http, parsing, phrasing, help, user, php, url, with, text, replace
im not quite sure where to ...
require 'find' excludes = [".svn", "lib", "modules", "feathers"] exclude_files = [] ...
Ruby Crawl a directory and searc...
This recursively goes throu...
<?php
function fecha ()
{
...
PHP Spanish date Function
by streo.myopenid.com,
November 13, 2007 11:54,
5 refactorings, tagged with php, date, spanish, StReO, 3v-doble
hi, I'm a student and i cre...
<?php
class MyClass{
function __construct(){
...
PHP Crossversion constructors f...
by fullo,
November 09, 2007 16:08,
3 refactorings, tagged with php, oop, object, constructor, php5, php4
Which one is the best cross...
The built in image function...