2011-01-15
Thought I would consolidate file upload functions for PHP into one nice easy class - compatible with dbphp - makes my life soooooo easy ;)
class FileUpload {
/*Documentation
FileUpload Class 0.1 - 2010-01-15 by icurtain.co.uk
Imeplentation is as follows
$file = new F...
2009-08-22
The Hash maker is a quick and easy way to either make hashes and use them directly or try to work out what your lost password was
I find it quite useful to be able to generate hashes for passwords directly for the purposes of resetting passwords directly in a database...
2009-05-16
dbPHP is a lightweight framework allowing object relational mapping between (at present) mySQL and PHP.
dbphp project home
dbphp twitter
Google Code Home
SourceForge Code Home
dbphp manual
Object relational mapping is the process of creating a structural relationship...
2009-03-24
This returns the average colour of an image in PHP using GD libraries and then, assuming you ahve no sense of design, you could use this to set the background colour of a page. This code can be slotted directly into the ImageHandler class also on this site
public function getAverageColour(){
...
2008-03-07
This little application was an attempt to map an image into an array of pixel objects using the PHP GD libraries and it's made me painfully aware of how limited PHP is in it's ability to handle large or complex data structures.
Below is a simple piece of code that attempts to copy each pixel valu...
2008-07-23
get/set code generator for PHP - all Java development environments allow you to generate getter and setter code automatically
enter comma seperated variable names: size, length, width, etc...
2008-07-13
Finish ORM classes for database and XML
Work on existing systems to implement full XML output from logic classes to display classes...
2008-07-01
$var = "value";
$value = "some value";
echo $$var;
For some insane reason PHP allows you to have variable variables.. if you ever use these you should probably be prohibited from using a computer again...
2008-06-27
Here is a little class I've written to make handling cookie sessions a little nicer in PHP. I'm not a big fan of session cookies but PHP makes a real mess of 'transparent' session ids with search engines - making it think you have infinite web pages.. so here goes
class CookieManager{
...
2008-06-25
PHP ArrayList Class - Having spent the last year working in Java, working with PHP now makes me cry and weep in anguish.. for many reasons, one of the main ones being its' complete inability to store more than 1 thing in anything other than an array
I have attempted to create a class that handles d...
2008-06-09
This section of code validates a credit card or any other luhn number - useful as an initial card number check for merchant interfaces etc
the function returns either 0 or 1 depending on whether the luhn check was successful. The luhn check does a load of recursive calculation and then divides by...
2008-01-15
http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#PHP...
2007-07-31
code i need for tuesday
class Sec3d{
function getSecureEnrollmentReponse {
if(isset($_POST['valid'])
{
$secEnRes[valid] = $_POST['valid'];
$secEnRes[trans_id] = $_POST['trans_id'];
$secEnRes[test_status] = $_POST['test_status'];
$secEnRes[hash] = $_P...
2007-07-21
...