1
2
3
4
==> functions.php 

<?php
...

PHP Register/Login Script

by penaf.myopenid.com, March 12, 2010 23:45, 4 refactorings, tagged with login, register, mysql, php

Hello People,

This websi...

84c8afb06eeacbf350b5b42cb795f195 Talk
1
$outputstr =  preg_replace('/[-]{2,}/','-',trim(strtolower(str_replace(' ','-',preg_replace('/[^A-Z0-9- ]+/i','',$inputstr))),'-'));

PHP Trimming excess from string

by paulswansea.myopenid.com, February 05, 2010 16:07, 2 refactorings, tagged with php, regex, replace

I'm trying to get an input ...

E4bd1595f34e7e03765eda6ed65bf6bb Talk
1
2
3
4
<?php

/**
...

PHP GDLib Progressbar Class

by gwrtheyrn, January 13, 2010 21:07, No refactoring, tagged with php, gdlib, image, png, progressbar

A quick progressbar class u...

D3bd7339e1941bc25c05110b69a82721 Talk
1
2
3
4
<?php

/**
...

PHP GDLib Progressbar Class

by gwrtheyrn, January 13, 2010 21:06, No refactoring, tagged with php, progressbar, gdlib, OOP Class, image

A quick PHP progressbar cla...

D3bd7339e1941bc25c05110b69a82721 Talk
1
2
3
4
<?php
// $arraydata contains the mysql results in array 

...

PHP array to csv

by armano.myopenid.com, December 07, 2009 13:35, 6 refactorings, tagged with php, csv

hi guys, is there other bet...

1cd9c8984f2fdeb996130d54d62a98d9 Talk
1
2
3
4
<?php
/**
 * PDO database wrapper for MySQL.
...

PHP PDO database wrapper

by etheros.myopenid.com, October 21, 2009 06:33, 1 refactoring, tagged with php, pdo, mysql wrapper

Having tried PDO many moons...

Avatar Talk
1
2
3
4
<?php
/**
 * Database: MySQL connection
...

PHP MySQL database class

by lukas, September 02, 2009 20:20, 5 refactorings, tagged with php, database, mysql

This is a class to do all t...

A54000a44341dc35ab30a332a49784d3 Talk
1
2
3
4
<?php
function word_limiter( $text, $limit = 30, $chars = '0123456789' ) {
    if( strlen( $text ) > $limit ) {
...

PHP Limit amount of words displ...

by charliefrancis, July 30, 2009 09:37, 6 refactorings, tagged with php, speed, limit

It returns a string with a ...

2a6fcd188b27b22064dcbd416f2c8ef1 Talk
1
2
3
4
<?php

public static function addUser($username, $email, $password)
...

PHP User Registration Function

by gwrtheyrn, July 24, 2009 20:05, 3 refactorings, tagged with php, registration, user, mysql, real_escape_string

Is this user registration f...

D3bd7339e1941bc25c05110b69a82721 Talk
1
2
3
4
/**
 * Generates a multi-column table from an array 
 *
...

PHP Generate table from array

by gwrtheyrn, July 24, 2009 10:48, 3 refactorings, tagged with table, array, php

This function generates a m...

D3bd7339e1941bc25c05110b69a82721 Talk
1
2
3
4
<?php

// open the db connection
...

PHP DRY switch

by htxt, June 10, 2009 10:16, 1 refactoring, tagged with php, wordpress, switch, dry

This is part of an events p...

13e1f55ad0de3139470536022839ed89 Talk
1
2
3
4
<?php

if (!defined('ANTIHACK'))
...

PHP php mysql wrapper begginer

by fantomel, April 03, 2009 14:33, 5 refactorings, tagged with php, mysql, mysql wrapper, wrappers, wrap, simple

Hello ppl i'm new to php\\O...

8bdcb8b82adf1dd562970b22d3458d7d Talk
1
2
3
4
<?php
/**
 * Db Class
...

PHP My DB static class based ar...

by alexwy.myopenid.com, February 25, 2009 06:41, 2 refactorings, tagged with php, pdo, oop

I was looking for an easy w...

D0f517950e189ebe69c903a14cf36fab Talk
1
2
3
4
function compareEmail($u, $p, $i)
{
    require ('dbconn.php');
...

PHP IMAP Mail Comparison

by Tim Fevens, February 23, 2009 05:17, No refactoring, tagged with php, imap, email

This is used to compare a n...

7f6be27770fe971e3f913dc4aea65e27 Talk
1
2
3
4
<?php
function innerHTML($node){
  $doc = new DOMDocument();
...

PHP innerHTML of a DOMElement

by hubfactor, January 19, 2009 00:56, 2 refactorings, tagged with html, php

The equivalent of the non-s...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
1
2
3
<?php
$player_1_bet = 12; // ALL IN
...

PHP Poker Side Pots

by extjspoker, October 28, 2008 17:03, 2 refactorings, tagged with php, poker

So I don't currently have a...

4b3c8b874641c3398f7aae0be9873163 Talk
1
2
3
4
#!/usr/bin/php
<?php
/**
...

PHP HTML Filter

by grom, October 23, 2008 23:00, 5 refactorings, tagged with php, html, parser, sanitize

Only allow subset of HTML. ...

A14537020ec5b11fea3b956353724860 Talk
1
2
3
4
function get_next_seat($table_id, $start_seat) {
		$player_data = $this->admin->get_player_data($table_id);
		
...

PHP Get Next Turn

by extjspoker, October 21, 2008 22:55, 5 refactorings, tagged with php, poker

The below function is used ...

4b3c8b874641c3398f7aae0be9873163 Talk
1
2
3
4
	function create_link($string) {

		$input = media_title($string);
...

PHP Prepare links - friendly URLs

by Memf, September 04, 2008 05:57, 2 refactorings, tagged with php, short, friendly, friendly urls, url, URLs, prepare, code, memforis, function, memf, links, create link

Please help shorten the cod...

71367d98df2bf14cbf704e7741eb402d Talk
1
2
3
4
<?php

class RequestFile
...

PHP Universal File Download Class

by Chris Dean, August 16, 2008 11:21, 4 refactorings, tagged with php, 5, universal, file, download, class

After finding different hos...

151e36cc7f789a4790c8ca437e3a1f60 Talk
1
2
3
4
/**
 * Scale an image according to input canvas dimensions. 
 * No cropping will occur, the scaled image is "centered" to canvas.
...

PHP Resize image to canvas

by Juha Hollanti, August 13, 2008 11:50, 3 refactorings, tagged with php, image

The built in image function...

A623216a5d2384489e012478c555d167 Talk
1
2
3
4
	public function setClass($class){
		switch($class){
			case "050":
...

PHP switch statement a good idea?

by cmcculloh, August 12, 2008 18:19, 5 refactorings, tagged with case, switch, php

I'm making a switch stateme...

298e0497aa6b76a573f17e6a2bb22dec Talk
1
2
3
4
/**
 * 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'...

A623216a5d2384489e012478c555d167 Talk
1
2
3
4
class DB {
        /*
        $c=new DB();
...

PHP Database Class

by seal-7.blogspot.com, July 09, 2008 17:47, 4 refactorings, tagged with database, php

We use this class in 1000's...

Avatar Talk
1
2
3
4
<?php

/**
...

PHP Interfacing Tor with cURL

by Ishkur, June 28, 2008 20:29, 4 refactorings, tagged with Tor, OOP Class, php

I found a php function that...

6dc0e9a07bcff97ac9b111f36e12f1f6 Talk